Skip to content

Commit

Permalink
Merge pull request #204 from projectsyn/add-test-openshift-postgres
Browse files Browse the repository at this point in the history
Add namespace test for OpenShift Postgres
  • Loading branch information
megian authored Jan 27, 2023
2 parents 2aad9f0 + 50693d4 commit ac7be1c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/openshift-postgres.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
parameters:
keycloak:
namespace: syn-openshift-postgres
postgresql_helm_values:
primary:
podSecurityContext:
Expand Down
23 changes: 23 additions & 0 deletions tests/openshift-postgres/namespace_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package builtin

import (
"testing"

"github.com/projectsyn/component-keycloak/common"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

var (
expectedNsLabels = map[string]string{
"SYNMonitoring": "main",
"name": "syn-openshift-postgres",
}
testPath = "../../compiled/openshift-postgres/openshift-postgres"
)

func Test_NamespaceLabels(t *testing.T) {
ns := common.DecodeNamespace(t, testPath+"/00_namespace.yaml")
require.NotEmpty(t, ns.Labels)
assert.Equal(t, expectedNsLabels, ns.Labels)
}

0 comments on commit ac7be1c

Please sign in to comment.