Skip to content

Commit

Permalink
Create a DSE test matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
emerkle826 committed Oct 18, 2022
1 parent 6f3a635 commit 36c25f3
Show file tree
Hide file tree
Showing 45 changed files with 226 additions and 74 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/kindIntegTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,17 @@ jobs:
needs: build_docker_images
strategy:
matrix:
version:
- "3.11"
- "4.0"
integration_test:
# Single worker tests:
- additional_serviceoptions
- additional_volumes
# - delete_node_terminated_container # This does not test any operator behavior
- podspec_simple
# - smoke_test_oss # See next job
- smoke_test_dse
# - smoke_test_dse # See next job
- terminate
- timeout_prestop_termination
- upgrade_operator
Expand Down Expand Up @@ -103,13 +106,20 @@ jobs:
- config_fql
- decommission_dc
# - stop_resume_scale_up # Odd insufficient CPU issues in kind+GHA
include:
- version: "6.8.26"
serverImage: datastax/dse-mgmtapi-6_8:6.8.26-jdk8
serverType: dse
# let other tests continue to run
# even if one fails
fail-fast: false
runs-on: ubuntu-latest
env:
CGO_ENABLED: 0
M_INTEG_DIR: ${{ matrix.integration_test }}
M_SERVER_VERSION: ${{ matrix.version }}
M_SERVER_IMAGE: ${{ matrix.serverImage }}
M_SERVER_TYPE: ${{ matrix.serverType }}
steps:
- uses: actions/checkout@v2
if: github.event_name == 'pull_request'
Expand All @@ -124,7 +134,7 @@ jobs:
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: k8s-logs-${{ matrix.integration_test }}
name: k8s-logs-${{ matrix.integration_test }}-${{ matrix.serverType }}-${{ matrix.version }}
path: ./build/kubectl_dump
kind_smoke_tests:
needs: build_docker_images
Expand All @@ -140,13 +150,17 @@ jobs:
serverImage: k8ssandra/cass-management-api:3.11.7-v0.1.24 # k8ssandra 1.1
- version: 4.0.0
serverImage: k8ssandra/cass-management-api:4.0.0-v0.1.28 # k8ssandra 1.3
- version: 6.8.26
serverImage: datastax/dse-mgmtapi-6_8:6.8.26-jdk8 # DSE 6.8.26
serverType: dse
fail-fast: true
runs-on: ubuntu-latest
env:
CGO_ENABLED: 0
M_INTEG_DIR: smoke_test_oss
M_SERVER_VERSION: ${{ matrix.version }}
M_SERVER_IMAGE: ${{ matrix.serverImage }}
M_SERVER_TYPE: ${{ matrix.serverType }}
steps:
- uses: actions/checkout@v2
if: github.event_name == 'pull_request'
Expand Down
5 changes: 4 additions & 1 deletion tests/additional_seeds/additional_seeds_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,10 @@ var _ = Describe(testName, func() {
ns.WaitForOperatorReady()

step = "creating a datacenter resource with 2 racks/4 nodes"
k = kubectl.ApplyFiles(dcYaml)
testFile, err := ginkgo_util.CreateTestFile(dcYaml)
Expect(err).ToNot(HaveOccurred())

k = kubectl.ApplyFiles(testFile)
ns.ExecAndLog(step, k)

ns.WaitForDatacenterReady(dcName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ var _ = Describe(testName, func() {
ns.WaitForOperatorReady()

step := "creating a datacenter resource with 1 rack/1 node"
k := kubectl.ApplyFiles(dcYaml)
testFile, err := ginkgo_util.CreateTestFile(dcYaml)
Expect(err).ToNot(HaveOccurred())

k := kubectl.ApplyFiles(testFile)
ns.ExecAndLog(step, k)

ns.WaitForDatacenterReadyWithTimeouts(dcName, 600, 120)
Expand All @@ -64,7 +67,7 @@ var _ = Describe(testName, func() {
ns.WaitForOutputAndLog(step, k, "localhost", 300)

step = "deleting the dc"
k = kubectl.DeleteFromFiles(dcYaml)
k = kubectl.DeleteFromFiles(testFile)
ns.ExecAndLog(step, k)

step = "checking that the dc no longer exists"
Expand Down
5 changes: 4 additions & 1 deletion tests/bring_up_graph/bring_up_graph_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ var _ = Describe(testName, func() {
ns.WaitForOperatorReady()

step := "creating a datacenter resource with graph"
k := kubectl.ApplyFiles(dcYaml)
testFile, err := ginkgo_util.CreateTestFile(dcYaml)
Expect(err).ToNot(HaveOccurred())

k := kubectl.ApplyFiles(testFile)
ns.ExecAndLog(step, k)

ns.WaitForDatacenterReady(dcName)
Expand Down
5 changes: 4 additions & 1 deletion tests/bring_up_solr/bring_up_solr_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ var _ = Describe(testName, func() {
ns.WaitForOperatorReady()

step := "creating a datacenter resource with solr"
k := kubectl.ApplyFiles(dcYaml)
testFile, err := ginkgo_util.CreateTestFile(dcYaml)
Expect(err).ToNot(HaveOccurred())

k := kubectl.ApplyFiles(testFile)
ns.ExecAndLog(step, k)

// solr takes 10 minutes to come up on my machine
Expand Down
5 changes: 4 additions & 1 deletion tests/bring_up_spark/bring_up_spark_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ var _ = Describe(testName, func() {
ns.WaitForOperatorReady()

step := "creating a datacenter resource with spark"
k := kubectl.ApplyFiles(dcYaml)
testFile, err := ginkgo_util.CreateTestFile(dcYaml)
Expect(err).ToNot(HaveOccurred())

k := kubectl.ApplyFiles(testFile)
ns.ExecAndLog(step, k)

ns.WaitForDatacenterReady(dcName)
Expand Down
7 changes: 5 additions & 2 deletions tests/canary_upgrade/canary_upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ var _ = Describe(testName, func() {
ns.WaitForOperatorReady()

step := "creating a datacenter"
k := kubectl.ApplyFiles(dcYaml)
testFile, err := ginkgo_util.CreateTestFile(dcYaml)
Expect(err).ToNot(HaveOccurred())

k := kubectl.ApplyFiles(testFile)
ns.ExecAndLog(step, k)

ns.WaitForSuperUserUpserted(dcName, 600)
Expand Down Expand Up @@ -101,7 +104,7 @@ var _ = Describe(testName, func() {
ns.WaitForDatacenterReadyPodCount(dcName, 3)

step = "deleting the dc"
k = kubectl.DeleteFromFiles(dcYaml)
k = kubectl.DeleteFromFiles(testFile)
ns.ExecAndLog(step, k)

step = "checking that the dc no longer exists"
Expand Down
5 changes: 4 additions & 1 deletion tests/cdc_successful/cdc_successful_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ var _ = Describe(testName, func() {
ns.WaitForOperatorReady()

step := "creating a DC"
k := kubectl.ApplyFiles(dcYaml)
testFile, err := ginkgo_util.CreateTestFile(dcYaml)
Expect(err).ToNot(HaveOccurred())

k := kubectl.ApplyFiles(testFile)
ns.ExecAndLog(step, k)

By("Deploying Pulsar")
Expand Down
10 changes: 8 additions & 2 deletions tests/cluster_wide_install/cluster_wide_install_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,17 @@ var _ = Describe(testName, func() {
Expect(err).ToNot(HaveOccurred())

step := "creating first datacenter resource"
k := kubectl.ApplyFiles(dc1Yaml)
testFile1, err := ginkgo_util.CreateTestFile(dc1Yaml)
Expect(err).ToNot(HaveOccurred())

k := kubectl.ApplyFiles(testFile1)
ns1.ExecAndLog(step, k)

step = "creating second datacenter resource"
k = kubectl.ApplyFiles(dc2Yaml)
testFile2, err := ginkgo_util.CreateTestFile(dc2Yaml)
Expect(err).ToNot(HaveOccurred())

k = kubectl.ApplyFiles(testFile2)
ns2.ExecAndLog(step, k)

ns1.WaitForDatacenterReady(dc1Name)
Expand Down
7 changes: 5 additions & 2 deletions tests/config_change/config_change_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ var _ = Describe(testName, func() {
ns.WaitForOperatorReady()

step := "creating a datacenter resource with 1 racks/1 node"
k := kubectl.ApplyFiles(dcYaml)
testFile, err := ginkgo_util.CreateTestFile(dcYaml)
Expect(err).ToNot(HaveOccurred())

k := kubectl.ApplyFiles(testFile)
ns.ExecAndLog(step, k)

ns.WaitForDatacenterReady(dcName)
Expand Down Expand Up @@ -90,7 +93,7 @@ var _ = Describe(testName, func() {
ns.WaitForOutputAndLog(step, k, dcName, 30)

step = "deleting the dc"
k = kubectl.DeleteFromFiles(dcYaml)
k = kubectl.DeleteFromFiles(testFile)
ns.ExecAndLog(step, k)

step = "checking that the cassdc no longer exists"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ var _ = Describe(testName, func() {
ns.WaitForOperatorReady()

step := "creating a datacenter resource with 1 racks/2 nodes"
k := kubectl.ApplyFiles(dcYaml)
testFile, err := ginkgo_util.CreateTestFile(dcYaml)
Expect(err).ToNot(HaveOccurred())

k := kubectl.ApplyFiles(testFile)
ns.ExecAndLog(step, k)

ns.WaitForDatacenterReady(dcName)
Expand Down
7 changes: 5 additions & 2 deletions tests/config_fql/config_fql_4x_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ var _ = Describe(testName, func() {
ns.WaitForOperatorReady()

step := "creating a datacenter resource with 1 rack/1 node"
k := kubectl.ApplyFiles(dcYaml)
testFile, err := ginkgo_util.CreateTestFile(dcYaml)
Expect(err).ToNot(HaveOccurred())

k := kubectl.ApplyFiles(testFile)
ns.ExecAndLog(step, k)

ns.WaitForDatacenterReadyWithTimeouts(dcName, 1200, 1200)
Expand All @@ -75,7 +78,7 @@ var _ = Describe(testName, func() {
}, time.Second*60).Should(BeTrue())

step = "deleting the dc"
k = kubectl.DeleteFromFiles(dcYaml)
k = kubectl.DeleteFromFiles(testFile)
ns.ExecAndLog(step, k)

step = "checking that the dc no longer exists"
Expand Down
5 changes: 4 additions & 1 deletion tests/config_secret/config_secret_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ var _ = Describe(testName, func() {
ns.ExecAndLog(step, k)

step = "creating datacenter"
k = kubectl.ApplyFiles(dcYaml)
testFile, err := ginkgo_util.CreateTestFile(dcYaml)
Expect(err).ToNot(HaveOccurred())

k = kubectl.ApplyFiles(testFile)
ns.ExecAndLog(step, k)
ns.WaitForDatacenterReadyWithTimeouts(dcName, 420, 30)

Expand Down
14 changes: 10 additions & 4 deletions tests/decommission_dc/decommission_dc_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ var _ = Describe(testName, func() {
ns.WaitForOperatorReady()

step := "creating the first datacenter resource with 1 rack/1 node"
k := kubectl.ApplyFiles(dc1Yaml)
testFile1, err := ginkgo_util.CreateTestFile(dc1Yaml)
Expect(err).ToNot(HaveOccurred())

k := kubectl.ApplyFiles(testFile1)
ns.ExecAndLog(step, k)

ns.WaitForDatacenterReady(dc1Name)
Expand All @@ -100,7 +103,10 @@ var _ = Describe(testName, func() {
Expect(err).ToNot(HaveOccurred())

step = "creating the second datacenter resource with 1 rack/1 node"
k = kubectl.ApplyFiles(dc2Yaml)
testFile2, err := ginkgo_util.CreateTestFile(dc2Yaml)
Expect(err).ToNot(HaveOccurred())

k = kubectl.ApplyFiles(testFile2)
ns.ExecAndLog(step, k)

// Add annotation to indicate we don't want the superuser created in dc2
Expand Down Expand Up @@ -137,7 +143,7 @@ var _ = Describe(testName, func() {

// Time to remove the dc2 and verify it has been correctly cleaned up
step = "deleting the dc2"
k = kubectl.DeleteFromFiles(dc2Yaml)
k = kubectl.DeleteFromFiles(testFile2)
ns.ExecAndLog(step, k)

step = "checking that the dc2 no longer exists"
Expand All @@ -155,7 +161,7 @@ var _ = Describe(testName, func() {

// Delete the remaining DC and expect it to finish correctly (it should not be decommissioned - that will hang the process and fail)
step = "deleting the dc1"
k = kubectl.DeleteFromFiles(dc1Yaml)
k = kubectl.DeleteFromFiles(testFile1)
ns.ExecAndLog(step, k)

step = "checking that the dc1 no longer exists"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ var _ = Describe(testName, func() {
ns.WaitForOperatorReady()

step := "creating a datacenter resource with 3 racks/3 nodes"
k := kubectl.ApplyFiles(dcYaml)
testFile, err := ginkgo_util.CreateTestFile(dcYaml)
Expect(err).ToNot(HaveOccurred())

k := kubectl.ApplyFiles(testFile)
ns.ExecAndLog(step, k)

ns.WaitForDatacenterReady(dcName)
Expand Down Expand Up @@ -85,7 +88,7 @@ var _ = Describe(testName, func() {
ns.WaitForDatacenterReady(dcName)

step = "deleting the dc"
k = kubectl.DeleteFromFiles(dcYaml)
k = kubectl.DeleteFromFiles(testFile)
ns.ExecAndLog(step, k)

step = "checking that the dc no longer exists"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ var _ = Describe(testName, func() {
ns.WaitForOperatorReady()

step := "creating a datacenter resource with 1 rack/1 node"
k := kubectl.ApplyFiles(dcYaml)
testFile, err := ginkgo_util.CreateTestFile(dcYaml)
Expect(err).ToNot(HaveOccurred())

k := kubectl.ApplyFiles(testFile)
ns.ExecAndLog(step, k)

step = "waiting for the pod to start up"
Expand Down Expand Up @@ -109,7 +112,7 @@ var _ = Describe(testName, func() {
ns.WaitForOutputAndLog(step, k, "true", 600)

step = "deleting the dc"
k = kubectl.DeleteFromFiles(dcYaml)
k = kubectl.DeleteFromFiles(testFile)
ns.ExecAndLog(step, k)

step = "checking that the dc no longer exists"
Expand Down
5 changes: 4 additions & 1 deletion tests/host_network/host_network_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ var _ = Describe(testName, func() {
ns.WaitForOperatorReady()

step = "creating a datacenter resource with 3 racks/3 nodes"
k = kubectl.ApplyFiles(dcYaml)
testFile, err := ginkgo_util.CreateTestFile(dcYaml)
Expect(err).ToNot(HaveOccurred())

k = kubectl.ApplyFiles(testFile)
ns.ExecAndLog(step, k)

ns.WaitForDatacenterReady(dcName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ var _ = Describe(testName, func() {
ns.WaitForOperatorReady()

step = "creating a datacenter resource with 1 racks/2 nodes"
k = kubectl.ApplyFiles(dcYaml)
testFile, err := ginkgo_util.CreateTestFile(dcYaml)
Expect(err).ToNot(HaveOccurred())

k = kubectl.ApplyFiles(testFile)
ns.ExecAndLog(step, k)

ns.WaitForDatacenterReady(dcName)
Expand Down
2 changes: 1 addition & 1 deletion tests/kustomize/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This is the default kustomize template for tests.
namespace: kustomize
namespace: test-additional-volumes

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
Expand Down
Loading

0 comments on commit 36c25f3

Please sign in to comment.