Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup e2e test scripts #2400

Merged
merged 1 commit into from
Jul 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 2 additions & 16 deletions test/e2e-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function install_pipelines() {
echo ">> Deploying Tekton Pipelines ($version)"
kubectl apply --filename "https://github.com/tektoncd/pipeline/releases/download/$version/release.yaml" || fail_test "Tekton Pipelines installation failed"

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

function uninstall_pipelines() {
local version=$1

echo ">> Deleting Tekton Pipelines ($version)"
kubectl delete --filename "https://github.com/tektoncd/pipeline/releases/download/$version/release.yaml" || fail_test "Tekton Pipelines deletion failed"
}

function uninstall_triggers() {
local version=$1

echo ">> Deleting Tekton Triggers ($version)"
kubectl delete --filename "https://github.com/tektoncd/triggers/releases/download/$version/release.yaml" || fail_test "Tekton Triggers deletion failed"
}

# Called by `fail_test` (provided by `e2e-tests.sh`) to dump info on test failure
function dump_extra_cluster_state() {
echo ">>> Pipeline controller log:"
Expand Down Expand Up @@ -147,7 +133,7 @@ function curl_envsubst_resource() {
exit 1
fi
set -x
cat "$1" | envsubst | curl -sS -X "$2" --data-binary @- -H "Content-Type: application/yaml" "$3" -H "Tekton-Client: tektoncd/dashboard"
cat "$1" | envsubst | curl -sS -X "$2" --data-binary @- -H "Content-Type: application/yaml" "$3" -H "Tekton-Client: tektoncd/dashboard-e2e"
set +x
}

Expand Down
5 changes: 1 addition & 4 deletions test/e2e-tests.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

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

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

kill -9 $dashboardForwardPID
kill -9 $podForwardPID

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

Expand Down
4 changes: 2 additions & 2 deletions test/resources/envsubst/pipelinerun.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ metadata:
app: e2e-pipelinerun
spec:
pipelineRef:
name: ${PIPELINE_NAME}
serviceAccountName: ${APP_SERVICE_ACCOUNT}
name: simple-pipeline
serviceAccountName: e2e-tests