1
0
Fork 0
mirror of https://github.com/external-secrets/external-secrets.git synced 2024-12-15 17:51:01 +00:00

Dummy change for actions to trigger again

This commit is contained in:
Sebastian Gomez 2022-01-27 12:59:43 -05:00
parent 854df02dc0
commit 5d0bd97b74

View file

@ -138,6 +138,8 @@ var _ = Describe("ExternalSecret controller", func() {
targetPropObj = "{{ .targetProperty | toString | upper }} was templated"
FooValue = "map-foo-value"
BarValue = "map-bar-value"
foo = "foo"
bar = "bar"
)
var ExternalSecretNamespace string
@ -530,13 +532,13 @@ var _ = Describe("ExternalSecret controller", func() {
fakeProvider.WithGetSecret([]byte(secretVal), nil)
fakeProvider.WithGetSecretMap(map[string][]byte{
"targetProperty": []byte(FooValue),
"bar": []byte(BarValue),
bar: []byte(BarValue),
}, nil)
tc.checkSecret = func(es *esv1alpha1.ExternalSecret, secret *v1.Secret) {
// check values
Expect(string(secret.Data[targetProp])).To(Equal(expectedSecretVal))
Expect(string(secret.Data[tplStaticKey])).To(Equal(tplStaticVal))
Expect(string(secret.Data["bar"])).To(Equal("value from map: map-bar-value"))
Expect(string(secret.Data[bar])).To(Equal("value from map: map-bar-value"))
Expect(string(secret.Data[tplFromKey])).To(Equal("tpl-from-value: someValue // map-bar-value"))
Expect(string(secret.Data[tplFromSecKey])).To(Equal("tpl-from-sec-value: someValue // map-bar-value"))
}
@ -549,8 +551,8 @@ var _ = Describe("ExternalSecret controller", func() {
tc.externalSecret.Spec.RefreshInterval = &metav1.Duration{Duration: time.Second}
tc.externalSecret.Spec.Target.Template = &esv1alpha1.ExternalSecretTemplate{
Metadata: esv1alpha1.ExternalSecretTemplateMetadata{
Labels: map[string]string{"foo": "bar"},
Annotations: map[string]string{"foo": "bar"},
Labels: map[string]string{foo: bar},
Annotations: map[string]string{foo: bar},
},
Type: v1.SecretTypeOpaque,
Data: map[string]string{
@ -609,8 +611,8 @@ var _ = Describe("ExternalSecret controller", func() {
tc.externalSecret.Spec.RefreshInterval = &metav1.Duration{Duration: time.Second}
tc.externalSecret.Spec.Target.Template = &esv1alpha1.ExternalSecretTemplate{
Metadata: esv1alpha1.ExternalSecretTemplateMetadata{
Labels: map[string]string{"foo": "bar"},
Annotations: map[string]string{"foo": "bar"},
Labels: map[string]string{foo: bar},
Annotations: map[string]string{foo: bar},
},
}
fakeProvider.WithGetSecret([]byte(secretVal), nil)
@ -696,13 +698,13 @@ var _ = Describe("ExternalSecret controller", func() {
},
}
fakeProvider.WithGetSecretMap(map[string][]byte{
"foo": []byte(FooValue),
"bar": []byte(BarValue),
foo: []byte(FooValue),
bar: []byte(BarValue),
}, nil)
tc.checkSecret = func(es *esv1alpha1.ExternalSecret, secret *v1.Secret) {
// check values
Expect(string(secret.Data["foo"])).To(Equal(FooValue))
Expect(string(secret.Data["bar"])).To(Equal(BarValue))
Expect(string(secret.Data[foo])).To(Equal(FooValue))
Expect(string(secret.Data[bar])).To(Equal(BarValue))
}
}
@ -739,7 +741,7 @@ var _ = Describe("ExternalSecret controller", func() {
// when a provider errors in a GetSecret call
// a error condition must be set.
providerErrCondition := func(tc *testCase) {
const secretVal = "foobar"
const secretVal = foo + bar
fakeProvider.WithGetSecret(nil, fmt.Errorf("boom"))
tc.externalSecret.Spec.RefreshInterval = &metav1.Duration{Duration: time.Millisecond * 100}
tc.checkCondition = func(es *esv1alpha1.ExternalSecret) bool {