Skip to content

Commit

Permalink
Only run yaml tests once
Browse files Browse the repository at this point in the history
  • Loading branch information
dibyom committed Aug 9, 2019
1 parent e0ab187 commit 2b4bd57
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions test/e2e-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,14 @@ function run_yaml_tests() {
echo ">> Starting tests"

# Applying *taskruns
for file in $(find ${REPO_ROOT_DIR}/examples/taskruns/ -name *.yaml | sort); do
for file in $(find ${REPO_ROOT_DIR}/examples/$1/ -name *.yaml | sort); do
perl -p -e 's/gcr.io\/christiewilson-catfactory/$ENV{KO_DOCKER_REPO}/g' ${file} | ko apply -f - || return 1
done

# Applying *pipelineruns
for file in $(find ${REPO_ROOT_DIR}/examples/pipelineruns/ -name *.yaml | sort); do
perl -p -e 's/gcr.io\/christiewilson-catfactory/$ENV{KO_DOCKER_REPO}/g' ${file} | ko apply -f - || return 1
done
# # Applying *pipelineruns
# for file in $(find ${REPO_ROOT_DIR}/examples/pipelineruns/ -name *.yaml | sort); do
# perl -p -e 's/gcr.io\/christiewilson-catfactory/$ENV{KO_DOCKER_REPO}/g' ${file} | ko apply -f - || return 1
# done

# Wait for tests to finish.
echo ">> Waiting for tests to finish for ${test}"
Expand Down
2 changes: 1 addition & 1 deletion test/e2e-tests-yaml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ install_pipeline_crd

# Run the tests
failed=0
for test in taskrun pipelinerun; do
for test in taskruns pipelineruns; do
header "Running YAML e2e tests for ${test}s"
if ! run_yaml_tests ${test}; then
echo "ERROR: one or more YAML tests failed"
Expand Down

0 comments on commit 2b4bd57

Please sign in to comment.