Skip to content

Commit

Permalink
test: change the way the namespace is created (and deleted), in order…
Browse files Browse the repository at this point in the history
… to delete it during the suite execution, not after

Signed-off-by: Gabriele Quaresima <[email protected]>
  • Loading branch information
gabriele-wolfox authored and NiccoloFei committed Oct 14, 2024
1 parent d58716c commit d8db978
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions tests/e2e/declarative_database_management_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,21 @@ var _ = Describe("Declarative databases management test", Label(tests.LabelSmoke

Context("plain vanilla cluster", Ordered, func() {
const (
namespacePrefix = "declarative-db"
dbname = "declarative"
namespace = "declarative-db"
dbname = "declarative"
)
var (
clusterName, namespace, databaseObjectName string
database *apiv1.Database
databaseWithDeleteRetainPolicy *apiv1.Database
err error
databaseWithDeleteRetainPolicyCrdName = "db-declarative-delete"
clusterName, databaseObjectName string
database *apiv1.Database
databaseWithDeleteRetainPolicy *apiv1.Database
err error
databaseWithDeleteRetainPolicyCrdName = "db-declarative-delete"
)

BeforeAll(func() {
// Create a cluster in a namespace we'll delete after the test
namespace, err = env.CreateUniqueTestNamespace(namespacePrefix)
// We set the namespace name as a constant, as we are going to test the namespace deletion inside
// the suite (not after), in order to check the finalizers removal
err = env.CreateNamespace(namespace)
Expect(err).ToNot(HaveOccurred())

clusterName, err = env.GetResourceNameFromYAML(clusterManifest)
Expand Down

0 comments on commit d8db978

Please sign in to comment.