Skip to content

Commit

Permalink
Remove snapshot webhook test: rancher/rke2#7489
Browse files Browse the repository at this point in the history
  • Loading branch information
mdrahman-suse committed Jan 17, 2025
1 parent 07605bf commit 18d0ebc
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 95 deletions.
8 changes: 0 additions & 8 deletions entrypoint/rebootinstances/rebootinstances_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"github.com/rancher/distros-test-framework/pkg/testcase"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

var _ = Describe("Test:", func() {
Expand Down Expand Up @@ -43,13 +42,6 @@ var _ = Describe("Test:", func() {
testcase.TestDaemonset(true, true)
})

if cluster.Config.Product == "rke2" {
It("Verifies Snapshot Webhook", func() {
err := testcase.TestSnapshotWebhook(true)
Expect(err).To(HaveOccurred(), err)
})
}

It("Reboot server and agent nodes", func() {
testcase.TestRebootInstances(cluster)
})
Expand Down
14 changes: 0 additions & 14 deletions entrypoint/upgradecluster/upgrademanual_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,6 @@ var _ = Describe("Test:", func() {
testcase.TestDNSAccess(true, false)
})

if cluster.Config.Product == "rke2" {
It("Verifies Snapshot Webhook pre-upgrade", func() {
err := testcase.TestSnapshotWebhook(true)
Expect(err).To(HaveOccurred())
})
}

if cluster.Config.Product == "k3s" {
It("Verifies LoadBalancer Service pre-upgrade", func() {
testcase.TestServiceLoadBalancer(true, false)
Expand Down Expand Up @@ -114,13 +107,6 @@ var _ = Describe("Test:", func() {
testcase.TestDNSAccess(false, true)
})

if cluster.Config.Product == "rke2" {
It("Verifies Snapshot Webhook after upgrade", func() {
err := testcase.TestSnapshotWebhook(true)
Expect(err).To(HaveOccurred())
})
}

if cluster.Config.Product == "k3s" {
It("Verifies LoadBalancer Service after upgrade", func() {
testcase.TestServiceLoadBalancer(false, true)
Expand Down
14 changes: 0 additions & 14 deletions entrypoint/upgradecluster/upgradesuc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,6 @@ var _ = Describe("SUC Upgrade Tests:", func() {
testcase.TestDNSAccess(true, false)
})

if cluster.Config.Product == "rke2" {
It("Verifies Snapshot Webhook pre-upgrade", func() {
err := testcase.TestSnapshotWebhook(true)
Expect(err).To(HaveOccurred())
})
}

if cluster.Config.Product == "k3s" {
It("Verifies LoadBalancer Service before upgrade", func() {
testcase.TestServiceLoadBalancer(true, false)
Expand Down Expand Up @@ -113,13 +106,6 @@ var _ = Describe("SUC Upgrade Tests:", func() {
testcase.TestDNSAccess(true, true)
})

if cluster.Config.Product == "rke2" {
It("Verifies Snapshot Webhook after upgrade", func() {
err := testcase.TestSnapshotWebhook(true)
Expect(err).To(HaveOccurred())
})
}

if cluster.Config.Product == "k3s" {
It("Verifies LoadBalancer Service after upgrade", func() {
testcase.TestServiceLoadBalancer(false, true)
Expand Down
8 changes: 0 additions & 8 deletions entrypoint/validatecluster/validatecluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"github.com/rancher/distros-test-framework/pkg/testcase"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

var _ = Describe("Test:", func() {
Expand Down Expand Up @@ -50,13 +49,6 @@ var _ = Describe("Test:", func() {
testcase.TestDNSAccess(true, true)
})

if cluster.Config.Product == "rke2" {
It("Verifies Snapshot Webhook", func() {
err := testcase.TestSnapshotWebhook(true)
Expect(err).To(HaveOccurred(), err)
})
}

if cluster.Config.Product == "k3s" {
It("Verifies Local Path Provisioner storage", func() {
testcase.TestLocalPathProvisionerStorage(cluster, true, true)
Expand Down
5 changes: 2 additions & 3 deletions pkg/testcase/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,9 @@ func getPrivatePods(cluster *shared.Cluster) (podDetails string) {
}

func CheckPodStatus(cluster *shared.Cluster) {
// cmd := "kubectl get pods -A --field-selector=status.phase!=Running | " +
// "kubectl get pods -A --field-selector=status.phase=Pending"
cmd := `kubectl get pods -A ` +
`-o jsonpath='{range .items[?(@.status.containerStatuses[-1:].state.waiting)]}{.metadata.namee}: {@.status.containerStatuses[*].state.waiting.reason}{"\n"}{end}'`
`-o jsonpath='{range .items[?(@.status.containerStatuses[-1:].state.waiting)]}{.metadata.name}: ` +
`{@.status.containerStatuses[*].state.waiting.reason}{"\n"}{end}'`
Eventually(func(g Gomega) bool {
pods, err := shared.GetPods(false)
g.Expect(err).NotTo(HaveOccurred())
Expand Down
30 changes: 0 additions & 30 deletions pkg/testcase/snapshotwebhook.go

This file was deleted.

9 changes: 0 additions & 9 deletions workloads/amd64/snapshot-webhook.yaml

This file was deleted.

9 changes: 0 additions & 9 deletions workloads/arm/snapshot-webhook.yaml

This file was deleted.

0 comments on commit 18d0ebc

Please sign in to comment.