Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Kidswiss committed Jan 24, 2025
1 parent 826bf01 commit f61c841
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/comp-functions/functions/vshnmariadb/proxysql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func getComp() *vshnv1.VSHNMariaDB {
}

func Test_copyCertificateSecret(t *testing.T) {
svc := commontest.LoadRuntimeFromFile(t, "empty.yaml")
svc := commontest.LoadRuntimeFromFile(t, "vshnmariadb/01-user-management.yaml")

// Given TLS
comp := getComp()
Expand All @@ -40,7 +40,7 @@ func Test_copyCertificateSecret(t *testing.T) {
//Then expect secret
assert.NoError(t, svc.GetDesiredComposedResourceByName(obj, comp.GetName()+"-proxysql-specific-certs"))

svc = commontest.LoadRuntimeFromFile(t, "empty.yaml")
svc = commontest.LoadRuntimeFromFile(t, "vshnmariadb/01-user-management.yaml")
// Given no TLS
comp.Spec.Parameters.TLS.TLSEnabled = false
// When applied
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ func Test_addProviderConfig(t *testing.T) {

config := &pgv1alpha1.ProviderConfig{}
assert.NoError(t, svc.GetDesiredKubeObject(config, comp.GetName()+"-providerconfig"))
assert.Equal(t, comp.GetInstanceNamespace(), secret.GetNamespace())

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ func Test_addProviderConfig(t *testing.T) {

config := &pgv1alpha1.ProviderConfig{}
assert.NoError(t, svc.GetDesiredKubeObject(config, comp.GetName()+"-providerconfig"))
assert.Equal(t, comp.GetInstanceNamespace(), secret.GetNamespace())

}

Expand Down
10 changes: 10 additions & 0 deletions test/functions/vshnmariadb/01-user-management.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
desired: {}
input: {}
observed:
resources:
myinstance-server-cert:
resource: {}
connection_details:
ca.crt: test
tls.crt: test
tls.key: test

0 comments on commit f61c841

Please sign in to comment.