Skip to content
Draft
1 change: 0 additions & 1 deletion automation/ceph-wffc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export TARGET=k8s-1.32
export RANDOM_CR=true
export KUBEVIRT_STORAGE=rook-ceph-default
export CEPH_WFFC=true
export CDI_E2E_SKIP=Destructive
export SNAPSHOT_SC=rook-ceph-block-wffc
export BLOCK_SC=rook-ceph-block-wffc
export CSICLONE_SC=rook-ceph-block-wffc
Expand Down
1 change: 0 additions & 1 deletion automation/ceph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@ export TARGET=k8s-1.32
#ensure no hard coded cdi cr in tests.
export RANDOM_CR=true
export KUBEVIRT_STORAGE=rook-ceph-default
export CDI_E2E_SKIP=Destructive
automation/test.sh
2 changes: 1 addition & 1 deletion automation/destructive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ set -ex
export TARGET=k8s-1.33
export KUBEVIRT_STORAGE=hpp
export KUBEVIRT_DEPLOY_PROMETHEUS=true
export CDI_E2E_FOCUS=Destructive
export CDI_LABEL_FILTER=Destructive
automation/test.sh
1 change: 0 additions & 1 deletion automation/istio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@
set -ex
export TARGET=k8s-1.33
export KUBEVIRT_STORAGE=hpp
export CDI_E2E_SKIP=Destructive
export KUBEVIRT_DEPLOY_ISTIO=true
automation/test.sh
1 change: 0 additions & 1 deletion automation/latest-hpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@
set -ex
export TARGET=k8s-1.33
export KUBEVIRT_STORAGE=hpp
export CDI_E2E_SKIP=Destructive
automation/test.sh
1 change: 0 additions & 1 deletion automation/nfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@ export TARGET=k8s-1.33
export KUBEVIRT_DEPLOY_NFS_CSI=true
export KUBEVIRT_STORAGE=nfs
export KUBEVIRT_NFS_DIR=${KUBEVIRT_NFS_DIR:-/var/lib/containers/nfs-data}
export CDI_E2E_SKIP=Destructive
automation/test.sh
1 change: 0 additions & 1 deletion automation/non-csi-hpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ set -ex
export TARGET=k8s-1.33
export KUBEVIRT_STORAGE=hpp
export HPP_CLASSIC=true
export CDI_E2E_SKIP=Destructive
automation/test.sh
1 change: 0 additions & 1 deletion automation/previous-hpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ set -ex
export TARGET=k8s-1.32
export KUBEVIRT_STORAGE=hpp
export KUBEVIRT_DEPLOY_PROMETHEUS=true
export CDI_E2E_SKIP=Destructive
automation/test.sh
5 changes: 4 additions & 1 deletion automation/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ kubectl() { cluster-up/kubectl.sh "$@"; }

export CDI_NAMESPACE="${CDI_NAMESPACE:-cdi}"

# Skip destructive tests by default
export CDI_LABEL_FILTER="${CDI_LABEL_FILTER:-!Destructive}"

make cluster-down
# Create .bazelrc to use remote cache
cat >ci.bazelrc <<EOF
Expand Down Expand Up @@ -108,7 +111,7 @@ fi
echo "Nodes are ready:"
kubectl get nodes

if [ "$KUBEVIRT_STORAGE" == "hpp" ] && [ "$CDI_E2E_FOCUS" == "Destructive" ]; then
if [ "$KUBEVIRT_STORAGE" == "hpp" ] && [ "$CDI_LABEL_FILTER" == "Destructive" ]; then
kubectl apply -f tests/manifests/snapshot
fi

Expand Down
1 change: 0 additions & 1 deletion automation/upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ set -ex
export TARGET=k8s-1.33
export KUBEVIRT_STORAGE=hpp
export MULTI_UPGRADE=true
export CDI_E2E_SKIP=Destructive
automation/test.sh
40 changes: 19 additions & 21 deletions tests/cdiconfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -528,30 +528,28 @@ var _ = Describe("CDI route config tests", Serial, func() {
})
})

var _ = Describe("CDIConfig instance management", Serial, func() {
var _ = Describe("[Destructive] CDIConfig instance management", Label("Destructive"), Serial, func() {
f := framework.NewFramework("cdiconfig-test")

Context("[Destructive]", Serial, func() {
It("[test_id:4952]Should re-create the object if deleted", func() {
By("Verifying the object exists")
config, err := f.CdiClient.CdiV1beta1().CDIConfigs().Get(context.TODO(), common.ConfigName, metav1.GetOptions{})
Expect(err).ToNot(HaveOccurred())
// Save the UID, so we can check it against a new one.
orgUID := config.GetUID()
_, _ = fmt.Fprintf(GinkgoWriter, "Original CDIConfig UID: %s\n", orgUID)
By("Deleting the object")
err = f.CdiClient.CdiV1beta1().CDIConfigs().Delete(context.TODO(), config.Name, metav1.DeleteOptions{})
Expect(err).ToNot(HaveOccurred())
It("[test_id:4952]Should re-create the object if deleted", func() {
By("Verifying the object exists")
config, err := f.CdiClient.CdiV1beta1().CDIConfigs().Get(context.TODO(), common.ConfigName, metav1.GetOptions{})
Expect(err).ToNot(HaveOccurred())
// Save the UID, so we can check it against a new one.
orgUID := config.GetUID()
_, _ = fmt.Fprintf(GinkgoWriter, "Original CDIConfig UID: %s\n", orgUID)
By("Deleting the object")
err = f.CdiClient.CdiV1beta1().CDIConfigs().Delete(context.TODO(), config.Name, metav1.DeleteOptions{})
Expect(err).ToNot(HaveOccurred())

Eventually(func() bool {
newConfig, err := f.CdiClient.CdiV1beta1().CDIConfigs().Get(context.TODO(), common.ConfigName, metav1.GetOptions{})
if err != nil {
return false
}
_, _ = fmt.Fprintf(GinkgoWriter, "New CDIConfig UID: %s\n", newConfig.GetUID())
return orgUID != newConfig.GetUID() && !apiequality.Semantic.DeepEqual(newConfig.Status, cdiv1.CDIConfigStatus{})
}, time.Second*30, time.Second).Should(BeTrue())
})
Eventually(func() bool {
newConfig, err := f.CdiClient.CdiV1beta1().CDIConfigs().Get(context.TODO(), common.ConfigName, metav1.GetOptions{})
if err != nil {
return false
}
_, _ = fmt.Fprintf(GinkgoWriter, "New CDIConfig UID: %s\n", newConfig.GetUID())
return orgUID != newConfig.GetUID() && !apiequality.Semantic.DeepEqual(newConfig.Status, cdiv1.CDIConfigStatus{})
}, time.Second*30, time.Second).Should(BeTrue())
})
})

Expand Down
2 changes: 1 addition & 1 deletion tests/import_proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ var _ = Describe("Import Proxy tests", func() {
}, time.Second*60, time.Second).Should(BeTrue())
}

Context("[Destructive]", Serial, func() {
Context("[Destructive]", Label("Destructive"), Serial, func() {
DescribeTable("should", func(args importProxyTestArguments) {

now := time.Now()
Expand Down
2 changes: 1 addition & 1 deletion tests/monitoring_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const (
metricConsistentPollingTimeout = 2 * time.Minute
)

var _ = Describe("[Destructive] Monitoring Tests", Serial, func() {
var _ = Describe("[Destructive] Monitoring Tests", Label("Destructive"), Serial, func() {
f := framework.NewFramework("monitoring-test")

var (
Expand Down
2 changes: 1 addition & 1 deletion tests/operator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import (
)

var _ = Describe("ALL Operator tests", func() {
Context("[Destructive]", Serial, func() {
Context("[Destructive]", Label("Destructive"), Serial, func() {
var _ = Describe("Operator tests", func() {
f := framework.NewFramework("operator-test")

Expand Down