Skip to content

Commit 00cff00

Browse files
AlanGreenetekton-robot
authored andcommitted
Cleanup e2e test scripts
Remove unnecessary environment variables Remove unused functions Remove bad `kill` command using unset variable Fix typos
1 parent fbd25ff commit 00cff00

File tree

3 files changed

+5
-22
lines changed

3 files changed

+5
-22
lines changed

test/e2e-common.sh

+2-16
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function install_pipelines() {
4545
echo ">> Deploying Tekton Pipelines ($version)"
4646
kubectl apply --filename "https://github.com/tektoncd/pipeline/releases/download/$version/release.yaml" || fail_test "Tekton Pipelines installation failed"
4747

48-
# Make sure thateveything is cleaned up in the current namespace.
48+
# Make sure that everything is cleaned up in the current namespace.
4949
for res in pipelineresources tasks pipelines taskruns pipelineruns; do
5050
kubectl delete --ignore-not-found=true ${res}.tekton.dev --all
5151
done
@@ -64,20 +64,6 @@ function install_triggers() {
6464
wait_until_pods_running tekton-pipelines || fail_test "Tekton Triggers did not come up"
6565
}
6666

67-
function uninstall_pipelines() {
68-
local version=$1
69-
70-
echo ">> Deleting Tekton Pipelines ($version)"
71-
kubectl delete --filename "https://github.com/tektoncd/pipeline/releases/download/$version/release.yaml" || fail_test "Tekton Pipelines deletion failed"
72-
}
73-
74-
function uninstall_triggers() {
75-
local version=$1
76-
77-
echo ">> Deleting Tekton Triggers ($version)"
78-
kubectl delete --filename "https://github.com/tektoncd/triggers/releases/download/$version/release.yaml" || fail_test "Tekton Triggers deletion failed"
79-
}
80-
8167
# Called by `fail_test` (provided by `e2e-tests.sh`) to dump info on test failure
8268
function dump_extra_cluster_state() {
8369
echo ">>> Pipeline controller log:"
@@ -147,7 +133,7 @@ function curl_envsubst_resource() {
147133
exit 1
148134
fi
149135
set -x
150-
cat "$1" | envsubst | curl -sS -X "$2" --data-binary @- -H "Content-Type: application/yaml" "$3" -H "Tekton-Client: tektoncd/dashboard"
136+
cat "$1" | envsubst | curl -sS -X "$2" --data-binary @- -H "Content-Type: application/yaml" "$3" -H "Tekton-Client: tektoncd/dashboard-e2e"
151137
set +x
152138
}
153139

test/e2e-tests.sh

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
# Copyright 2018-2021 The Tekton Authors
3+
# Copyright 2018-2022 The Tekton Authors
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -81,8 +81,6 @@ test_dashboard() {
8181
fi
8282

8383
# API/resource configuration
84-
export APP_SERVICE_ACCOUNT="e2e-tests"
85-
export PIPELINE_NAME="simple-pipeline"
8684
export PIPELINE_RUN_NAME="e2e-pipelinerun"
8785
export POD_LABEL="tekton.dev/pipelineRun=$PIPELINE_RUN_NAME"
8886
export EXPECTED_RETURN_VALUE="Hello World!"
@@ -198,7 +196,6 @@ test_dashboard() {
198196
--global-var readonly=$readonly || fail_test "Postman Triggers collection tests failed"
199197

200198
kill -9 $dashboardForwardPID
201-
kill -9 $podForwardPID
202199

203200
$tekton_repo_dir/scripts/installer uninstall ${@:2}
204201

test/resources/envsubst/pipelinerun.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ metadata:
88
app: e2e-pipelinerun
99
spec:
1010
pipelineRef:
11-
name: ${PIPELINE_NAME}
12-
serviceAccountName: ${APP_SERVICE_ACCOUNT}
11+
name: simple-pipeline
12+
serviceAccountName: e2e-tests

0 commit comments

Comments
 (0)