From 2f1238e23e37d894578518021b672d4d058ae1f5 Mon Sep 17 00:00:00 2001 From: savitaashture Date: Mon, 17 Jun 2024 22:02:39 +0530 Subject: [PATCH] Fix tkn and opc task --- Chart.yaml | 2 +- scripts/opc-client.sh | 2 +- scripts/tkn-client.sh | 2 +- test/e2e/opc-e2e.bats | 14 +++++++++++++- test/e2e/tkn-e2e.bats | 12 ++++++++++++ 5 files changed, 28 insertions(+), 4 deletions(-) diff --git a/Chart.yaml b/Chart.yaml index c67000a..1177caa 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 name: task-openshift -version: 0.1.0 +version: 0.1.1 description: Contains the Tekton Tasks to manage CLI related tasks type: application \ No newline at end of file diff --git a/scripts/opc-client.sh b/scripts/opc-client.sh index 6c41705..8be3ede 100644 --- a/scripts/opc-client.sh +++ b/scripts/opc-client.sh @@ -10,4 +10,4 @@ source "$(dirname ${BASH_SOURCE[0]})/opc-common.sh" [[ -f ${WORKSPACES_KUBECONFIG_DIR_PATH}/kubeconfig ]] && \ export KUBECONFIG=${WORKSPACES_KUBECONFIG_DIR_PATH}/kubeconfig -${PARAMS_SCRIPT} +eval ${PARAMS_SCRIPT} diff --git a/scripts/tkn-client.sh b/scripts/tkn-client.sh index dc52ee8..17d1b5f 100644 --- a/scripts/tkn-client.sh +++ b/scripts/tkn-client.sh @@ -10,4 +10,4 @@ source "$(dirname ${BASH_SOURCE[0]})/tkn-common.sh" [[ -f ${WORKSPACES_KUBECONFIG_DIR_PATH}/kubeconfig ]] && \ export KUBECONFIG=${WORKSPACES_KUBECONFIG_DIR_PATH}/kubeconfig -${PARAMS_SCRIPT} +eval ${PARAMS_SCRIPT} diff --git a/test/e2e/opc-e2e.bats b/test/e2e/opc-e2e.bats index a218f75..fcb8226 100644 --- a/test/e2e/opc-e2e.bats +++ b/test/e2e/opc-e2e.bats @@ -20,7 +20,19 @@ source ./test/helper/helper.sh # waiting a few seconds before asserting results sleep 15 - + + run kubectl delete taskrun --all + assert_success + + run tkn task start opc \ + --use-param-defaults \ + --skip-optional-workspace \ + --showlog >&3 + assert_success + + # waiting a few seconds before asserting results + sleep 15 + # assering the taskrun status, making sure all steps have been successful declare tmpl_file="${BASE_DIR}/go-template.tpl" # the following template is able to extract information from TaskRun and PipelineRun resources, diff --git a/test/e2e/tkn-e2e.bats b/test/e2e/tkn-e2e.bats index d484e5f..9a0c05c 100644 --- a/test/e2e/tkn-e2e.bats +++ b/test/e2e/tkn-e2e.bats @@ -18,6 +18,18 @@ source ./test/helper/helper.sh --showlog >&3 assert_success + # waiting a few seconds before asserting results + sleep 15 + + run kubectl delete taskrun --all + assert_success + + run tkn task start tkn \ + --use-param-defaults \ + --skip-optional-workspace \ + --showlog >&3 + assert_success + # waiting a few seconds before asserting results sleep 15