Skip to content

Commit

Permalink
Remove an old, non relevant e2e test
Browse files Browse the repository at this point in the history
Remove the "creates a simple cluster with ephemeral VMs with Passt" e2e
test, as it's not needed anymore.

Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com>
  • Loading branch information
nunnatsa committed Oct 20, 2023
1 parent e2fe8a1 commit d063fbf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 48 deletions.
37 changes: 0 additions & 37 deletions e2e/create-cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -527,43 +527,6 @@ var _ = Describe("CreateCluster", func() {
waitForTenantPods(ctx)
})

It("creates a simple cluster with ephemeral VMs with Passt", Label("ephemeralVMs"), func() {
By("generating cluster manifests from example template")
cmd := exec.Command(ClusterctlPath, "generate", "cluster", "kvcluster",
"--target-namespace", namespace,
"--kubernetes-version", os.Getenv("TENANT_CLUSTER_KUBERNETES_VERSION"),
"--control-plane-machine-count=1",
"--worker-machine-count=1",
"--from", "templates/cluster-template-passt-kccm.yaml")
stdout, _ := RunCmd(cmd)
Expect(os.WriteFile(manifestsFile, stdout, 0644)).To(Succeed())

By("posting cluster manifests example template")
cmd = exec.Command(KubectlPath, "apply", "-f", manifestsFile)
RunCmd(cmd)

By("Waiting for control plane")
waitForControlPlane()

By("Waiting on kubevirt machines to bootstrap")
waitForBootstrappedMachines()

By("Waiting on kubevirt machines to be ready")
waitForMachineReadiness(2, 0)

By("Waiting for getting access to the tenant cluster")
waitForTenantAccess(ctx, 2)

By("posting calico CNI manifests to the guest cluster and waiting for network")
installCalicoCNI()

By("Waiting for node readiness")
waitForNodeReadiness(ctx)

By("waiting all tenant Pods to be Ready")
waitForTenantPods(ctx)
})

It("should remediate a running VMI marked as being in a terminal state", Label("ephemeralVMs"), func() {
By("generating cluster manifests from example template")
cmd := exec.Command(ClusterctlPath, "generate", "cluster", "kvcluster",
Expand Down
23 changes: 12 additions & 11 deletions hack/run-e2e.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

set -e -o pipefail
set -x

TOOLS_DIR=${TOOLS_DIR:-hack/tools}

Expand All @@ -10,25 +11,25 @@ DUMP_VERSION=$(curl -L https://storage.googleapis.com/kubevirt-prow/devel/nightl
DUMP_PATH=${TOOLS_DIR}/bin/kubevirt-${DUMP_VERSION}-dump
TEST_WORKING_DIR=${TOOLS_DIR}/e2e-test-workingdir
export ARTIFACTS=${ARTIFACTS:-k8s-reporter}
mkdir -p $ARTIFACTS
mkdir -p "${ARTIFACTS}"

if [ ! -f "$DUMP_PATH" ]; then
curl -L https://storage.googleapis.com/kubevirt-prow/devel/nightly/release/kubevirt/kubevirt/${DUMP_VERSION}/testing/dump -o $DUMP_PATH
chmod 755 $DUMP_PATH
if [ ! -f "${DUMP_PATH}" ]; then
curl -L "https://storage.googleapis.com/kubevirt-prow/devel/nightly/release/kubevirt/kubevirt/${DUMP_VERSION}/testing/dump" -o "$DUMP_PATH"
chmod 755 "${DUMP_PATH}"
fi

if [ ! -f "${CLUSTERCTL_PATH}" ]; then
echo >&2 "Downloading clusterctl ..."
curl -L https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.0.0/clusterctl-linux-amd64 -o ${CLUSTERCTL_PATH}
chmod u+x ${CLUSTERCTL_PATH}
curl -L https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.2/clusterctl-linux-amd64 -o "${CLUSTERCTL_PATH}"
chmod +x "${CLUSTERCTL_PATH}"
fi

if [ ! -f "${KUBECTL_PATH}" ]; then
echo >&2 "Downloading kubectl ..."
curl -L "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" -o ${KUBECTL_PATH}
chmod u+x ${KUBECTL_PATH}
curl -L "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" -o "${KUBECTL_PATH}"
chmod +x "${KUBECTL_PATH}"
fi

rm -rf $TEST_WORKING_DIR
mkdir -p $TEST_WORKING_DIR
$BIN_DIR/e2e.test -ginkgo.v -test.v -ginkgo.no-color --kubectl-path $KUBECTL_PATH --clusterctl-path $CLUSTERCTL_PATH --working-dir $TEST_WORKING_DIR --dump-path $DUMP_PATH
rm -rf "${TEST_WORKING_DIR}"
mkdir -p "${TEST_WORKING_DIR}"
"${BIN_DIR}/e2e.test" -ginkgo.v -test.v -ginkgo.no-color --kubectl-path "${KUBECTL_PATH}" --clusterctl-path "${CLUSTERCTL_PATH}" --working-dir "${TEST_WORKING_DIR}" --dump-path "${DUMP_PATH}"

0 comments on commit d063fbf

Please sign in to comment.