Commit 3be1719 1 parent 047ec75 commit 3be1719 Copy full SHA for 3be1719
File tree 1 file changed +26
-0
lines changed
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -269,6 +269,24 @@ func TestHashResponse(t *testing.T) {
269
269
CreationTime : now ,
270
270
WrappedAccessor : "bar" ,
271
271
},
272
+ Auth : & logical.Auth {
273
+ ClientToken : "hvs.QWERTY-T1q5lEjIWux1Tjx-VGqAYJdd4FZtbp1wpD5Ym9pGh4KHGh2cy5TSjRndGoxaU44NzNscm5MSlRLQXZ0ZGg" ,
274
+ Accessor : "ABClk9ZNLGOCuTrOEIAooJG3" ,
275
+ TokenType : logical .TokenTypeService ,
276
+ },
277
+ Secret : & logical.Secret {
278
+ LeaseOptions : logical.LeaseOptions {
279
+ TTL : 3 ,
280
+ MaxTTL : 5 ,
281
+ Renewable : false ,
282
+ Increment : 1 ,
283
+ IssueTime : now ,
284
+ },
285
+ InternalData : map [string ]any {
286
+ "foo" : "bar" ,
287
+ },
288
+ LeaseID : "abc" ,
289
+ },
272
290
}
273
291
274
292
req := & logical.Request {MountPoint : "/foo/bar" }
@@ -280,6 +298,11 @@ func TestHashResponse(t *testing.T) {
280
298
nonHMACDataKeys := []string {"baz" }
281
299
282
300
expected := & response {
301
+ Auth : & auth {
302
+ Accessor : "hmac-sha256:253184715b2d5a6c3a2fc7afe0d2294085f5e886a1275ca735646a6f23be2587" ,
303
+ ClientToken : "hmac-sha256:2ce541100a8bcd687e8ec7712c8bb4c975a8d8599c02d98945e63ecd413bf0f3" ,
304
+ TokenType : "service" ,
305
+ },
283
306
Data : map [string ]interface {}{
284
307
"foo" : "hmac-sha256:f9320baf0249169e73850cd6156ded0106e2bb6ad8cab01b7bbbebe6d1065317" ,
285
308
"baz" : "foobar" ,
@@ -298,6 +321,9 @@ func TestHashResponse(t *testing.T) {
298
321
MountPoint : "/foo/bar" ,
299
322
MountRunningVersion : "123" ,
300
323
MountRunningSha256 : "256-256!" ,
324
+ Secret : & secret {
325
+ LeaseID : "abc" ,
326
+ },
301
327
}
302
328
303
329
inmemStorage := & logical.InmemStorage {}
You can’t perform that action at this time.
0 commit comments