mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-30 18:17:55 +00:00
Add more tests
This commit is contained in:
@@ -17,7 +17,11 @@ func TestParseSecret(t *testing.T) {
|
||||
},
|
||||
"warnings": [
|
||||
"a warning!"
|
||||
]
|
||||
],
|
||||
"wrap_info": {
|
||||
"token": "token",
|
||||
"ttl": 60
|
||||
}
|
||||
}`)
|
||||
|
||||
secret, err := ParseSecret(strings.NewReader(raw))
|
||||
@@ -35,6 +39,10 @@ func TestParseSecret(t *testing.T) {
|
||||
Warnings: []string{
|
||||
"a warning!",
|
||||
},
|
||||
WrapInfo: &SecretWrapInfo{
|
||||
Token: "token",
|
||||
TTL: 60,
|
||||
},
|
||||
}
|
||||
if !reflect.DeepEqual(secret, expected) {
|
||||
t.Fatalf("bad: %#v %#v", secret, expected)
|
||||
|
||||
Reference in New Issue
Block a user