Skip to content
Prev Previous commit
Next Next commit
Recovered deleted function and added highlighting logging before and …
…after e2e go testing call. Signed-off-by: Diana Arroyo <darroyo@us.ibm.com>
  • Loading branch information
dmatch01 committed Feb 23, 2020
commit 12f483225982553ac32bfe4fd1d198aeba0a0550
8 changes: 4 additions & 4 deletions hack/run-e2e-kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function kind-up-cluster {

# clean up
function cleanup {
echo "Cleaning up..."
echo "==========================>>>>> Cleaning up... <<<<<=========================="
echo " "

echo "Custom Resource Definitions..."
Expand All @@ -104,7 +104,7 @@ function cleanup {
kind delete cluster ${CLUSTER_CONTEXT}
}

function kube-batch-up {
function kube-test-env-up {
cd ${ROOT_DIR}

export KUBECONFIG="$(kind get kubeconfig-path ${CLUSTER_CONTEXT})"
Expand Down Expand Up @@ -165,9 +165,9 @@ trap cleanup EXIT

kind-up-cluster

kube-batch-up
kube-test-env-up

cd ${ROOT_DIR}

echo "Running E2E tests..."
echo "==========================>>>>> Running E2E tests... <<<<<=========================="
go test ./test/e2e -v -timeout 30m
22 changes: 20 additions & 2 deletions test/e2e/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,27 @@ func namespaceNotExist(ctx *context) wait.ConditionFunc {
}
}


func cleanupTestContext(cxt *context) {
//DO NOTHING
foreground := metav1.DeletePropagationForeground

err := cxt.kubeclient.CoreV1().Namespaces().Delete(cxt.namespace, &metav1.DeleteOptions{
PropagationPolicy: &foreground,
})
Expect(err).NotTo(HaveOccurred())

err = cxt.kubeclient.SchedulingV1beta1().PriorityClasses().Delete(masterPriority, &metav1.DeleteOptions{
PropagationPolicy: &foreground,
})
Expect(err).NotTo(HaveOccurred())

err = cxt.kubeclient.SchedulingV1beta1().PriorityClasses().Delete(workerPriority, &metav1.DeleteOptions{
PropagationPolicy: &foreground,
})
Expect(err).NotTo(HaveOccurred())

// Wait for namespace deleted.
err = wait.Poll(100*time.Millisecond, oneMinute, namespaceNotExist(cxt))
Expect(err).NotTo(HaveOccurred())
}

type taskSpec struct {
Expand Down