diff --git a/test/e2e.sh b/test/e2e.sh index eb9a43584..98a2650a9 100755 --- a/test/e2e.sh +++ b/test/e2e.sh @@ -227,23 +227,18 @@ main() { NODE_NAME=$(kubectl get nodes --no-headers=true -o=name) - # Build the operator container image. - # This would build a container with tag storageos/cluster-operator:test, - # which is used in the e2e test setup below. - make image/cluster-operator - - # Move the operator container inside Kind container so that the image is - # available to the docker in docker environment. - if [ "$1" = "kind" ]; then - x=$(docker ps -f name=kind-1-control-plane -q) - docker save storageos/cluster-operator:test > cluster-operator.tar - docker cp cluster-operator.tar $x:/cluster-operator.tar - - # containerd load image from tar archive (KinD with containerd). - docker exec $x bash -c "ctr -n k8s.io images import --base-name docker.io/storageos/cluster-operator:test /cluster-operator.tar" - fi - if [ "$2" = "olm" ]; then + # Build the operator container image. + # This would build a container with tag storageos/cluster-operator:test, + # which is used in the e2e test setup below. + make image/cluster-operator + + # Move the operator container inside Kind container so that the image is + # available to the docker in docker environment. + if [ "$1" = "kind" ]; then + kind load docker-image storageos/cluster-operator:test --name kind-1 + fi + # Lint the OLM CSV bundle. make olm-lint @@ -294,13 +289,13 @@ main() { # NOTE: Append this test command with `|| true` to debug by inspecting the # resource details. Also comment `defer ctx.Cleanup()` in the cluster to # avoid resouce cleanup. - operator-sdk test local ./test/e2e --go-test-flags "-v -tags csi" --namespace storageos-operator + operator-sdk test local ./test/e2e --up-local --go-test-flags "-v -tags csi" --namespace storageos-operator operator-sdk-e2e-cleanup - operator-sdk test local ./test/e2e --go-test-flags "-v -tags csideployment" --namespace storageos-operator + operator-sdk test local ./test/e2e --up-local --go-test-flags "-v -tags csideployment" --namespace storageos-operator operator-sdk-e2e-cleanup - operator-sdk test local ./test/e2e --go-test-flags "-v -tags intree" --namespace storageos-operator + operator-sdk test local ./test/e2e --up-local --go-test-flags "-v -tags intree" --namespace storageos-operator operator-sdk-e2e-cleanup # echo "**** Resource details for storageos-operator namespace ****" diff --git a/test/e2e/util/cluster.go b/test/e2e/util/cluster.go index f90495628..e880e1fc2 100644 --- a/test/e2e/util/cluster.go +++ b/test/e2e/util/cluster.go @@ -68,18 +68,6 @@ func SetupOperator(t *testing.T, ctx *framework.TestCtx) { t.Fatalf("failed to initialize cluster resources: %v", err) } t.Log("Initialized cluster resources") - - namespace, err := ctx.GetNamespace() - if err != nil { - t.Fatal(err) - } - - f := framework.Global - - err = e2eutil.WaitForDeployment(t, f.KubeClient, namespace, "storageos-cluster-operator", 1, RetryInterval, Timeout) - if err != nil { - t.Fatal(err) - } } // ClusterStatusCheck checks the values of cluster status based on a given