From b4e111a8ce2325411a6fcd3645f13de759dd1e6f Mon Sep 17 00:00:00 2001 From: nam Date: Mon, 6 Nov 2023 15:53:00 +0100 Subject: [PATCH] add support for mdb 7 --- .action_templates/jobs/tests.yaml | 2 ++ .github/workflows/e2e-fork.yml | 2 ++ .github/workflows/e2e.yml | 2 ++ test/e2e/e2eutil.go | 2 +- ...replica_set_enterprise_upgrade_5_6_test.go | 26 +++++++++++++++++++ 5 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 test/e2e/replica_set_enterprise_upgrade_6_7/replica_set_enterprise_upgrade_5_6_test.go diff --git a/.action_templates/jobs/tests.yaml b/.action_templates/jobs/tests.yaml index 6701b8c2e..229e08117 100644 --- a/.action_templates/jobs/tests.yaml +++ b/.action_templates/jobs/tests.yaml @@ -10,6 +10,8 @@ tests: - test-name: replica_set_enterprise_upgrade_4_5 distro: ubi - test-name: replica_set_enterprise_upgrade_5_6 + distro: ubi. + - test-name: replica_set_enterprise_upgrade_6_7 distro: ubi - test-name: replica_set_recovery distro: ubi diff --git a/.github/workflows/e2e-fork.yml b/.github/workflows/e2e-fork.yml index 4cb8b75e1..87b59c5d0 100644 --- a/.github/workflows/e2e-fork.yml +++ b/.github/workflows/e2e-fork.yml @@ -96,6 +96,8 @@ jobs: distro: ubi - test-name: replica_set_enterprise_upgrade_5_6 distro: ubi + - test-name: replica_set_enterprise_upgrade_6_7 + distro: ubi - test-name: replica_set_recovery distro: ubi - test-name: replica_set_mongod_readiness diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index a3a20e3ec..1f16a5ae1 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -102,6 +102,8 @@ jobs: distro: ubi - test-name: replica_set_enterprise_upgrade_5_6 distro: ubi + - test-name: replica_set_enterprise_upgrade_6_7 + distro: ubi - test-name: replica_set_recovery distro: ubi - test-name: replica_set_mongod_readiness diff --git a/test/e2e/e2eutil.go b/test/e2e/e2eutil.go index 710ec9580..10a8eb9a2 100644 --- a/test/e2e/e2eutil.go +++ b/test/e2e/e2eutil.go @@ -70,7 +70,7 @@ func NewTestMongoDB(ctx *Context, name string, namespace string) (mdbv1.MongoDBC Spec: mdbv1.MongoDBCommunitySpec{ Members: 3, Type: "ReplicaSet", - Version: "6.0.5", + Version: "7.0.2", Arbiters: 0, Security: mdbv1.Security{ Authentication: mdbv1.Authentication{ diff --git a/test/e2e/replica_set_enterprise_upgrade_6_7/replica_set_enterprise_upgrade_5_6_test.go b/test/e2e/replica_set_enterprise_upgrade_6_7/replica_set_enterprise_upgrade_5_6_test.go new file mode 100644 index 000000000..e9fdb3f29 --- /dev/null +++ b/test/e2e/replica_set_enterprise_upgrade_6_7/replica_set_enterprise_upgrade_5_6_test.go @@ -0,0 +1,26 @@ +package replica_set + +import ( + "fmt" + "os" + "testing" + + e2eutil "github.com/mongodb/mongodb-kubernetes-operator/test/e2e" + "github.com/mongodb/mongodb-kubernetes-operator/test/e2e/replica_set_enterprise_upgrade" +) + +var ( + versionsForUpgrades = []string{"6.0.5", "7.0.2"} +) + +func TestMain(m *testing.M) { + code, err := e2eutil.RunTest(m) + if err != nil { + fmt.Println(err) + } + os.Exit(code) +} + +func TestReplicaSet(t *testing.T) { + replica_set_enterprise_upgrade.DeployEnterpriseAndUpgradeTest(t, versionsForUpgrades) +}