Skip to content

Commit

Permalink
Fix Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cmattoon authored Sep 12, 2018
1 parent 66c2f3f commit d100702
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions pkg/secret/secret_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,13 @@ func TestSetRefusesToOverwriteKey(t *testing.T) {
}
}

func TestNewSecretSetsValue(t *testing.T) {
func TestSetsValue(t *testing.T) {
p := provider.MockProvider{"FooBar123", "PlaintextIsAnError"}
s := v1.Secret{}
testSecret := NewSecret(s, p, "foo-secret", "namespace", "foo-param", "String", "")
testSecret, err := NewSecret(s, p, "foo-secret", "namespace", "foo-param", "String", "")
if err != nil {
t.Fail()
}
if testSecret.ParamValue != "FooBar123" {
t.Fail()
}
Expand All @@ -102,8 +105,10 @@ func TestNewSecretSetsValue(t *testing.T) {
func TestNewSecretDecryptsIfKeyIsSet(t *testing.T) {
p := provider.MockProvider{"$@#*$(@)*$", "FooBar123"}
s := v1.Secret{}
testSecret := NewSecret(s, p, "foo-secret", "namespace", "foo-param", "String", "my/test/key")

testSecret, err := NewSecret(s, p, "foo-secret", "namespace", "foo-param", "String", "my/test/key")
if err != nil {
t.Fail()
}
if testSecret.ParamValue != p.DecryptedValue {
t.Fail()
}
Expand Down

0 comments on commit d100702

Please sign in to comment.