diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 5eb120d5..0c15cec0 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -93,15 +93,15 @@ ko apply -f config/ kubectl delete builds --all kubectl delete buildtemplates --all -# Launch the test suite (this can be cleaned up with "ko delete -R -f tests/") -ko apply -R -f tests/ +# Launch the test suite (this can be cleaned up with "ko delete -R -f test/") +ko apply -R -f test/ ``` You can track the progress of your builds with this command, which will also format the output nicely. ```shell -$ kubectl get builds -o=custom-columns-file=./tests/columns.txt +$ kubectl get builds -o=custom-columns-file=./test/columns.txt NAME TYPE STATUS START END test-custom-env-vars Succeeded True 2018-01-26T02:36:00Z 2018-01-26T02:36:02Z test-custom-volume Succeeded True 2018-01-26T02:36:07Z 2018-01-26T02:36:10Z @@ -120,11 +120,11 @@ The suite contains a mix of tests that are expected to end in `complete`, end-state, which you can feed into a label selector: ```shell -$ kubectl get builds -o=custom-columns-file=./tests/columns.txt -l expect=invalid +$ kubectl get builds -o=custom-columns-file=./test/columns.txt -l expect=invalid NAME TYPE STATUS START END test-template-duplicate-volume Invalid True -$ kubectl get builds -o=custom-columns-file=./tests/columns.txt -l expect=succeeded +$ kubectl get builds -o=custom-columns-file=./test/columns.txt -l expect=succeeded NAME TYPE STATUS START END test-custom-env-vars Succeeded True 2018-01-26T02:36:00Z 2018-01-26T02:36:02Z test-custom-volume Succeeded True 2018-01-26T02:36:07Z 2018-01-26T02:36:10Z diff --git a/hack/release.sh b/hack/release.sh index 95aa9ebb..209e4d8d 100755 --- a/hack/release.sh +++ b/hack/release.sh @@ -17,7 +17,7 @@ set -o errexit set -o pipefail -source "$(dirname $(readlink -f ${BASH_SOURCE}))/../tests/library.sh" +source "$(dirname $(readlink -f ${BASH_SOURCE}))/../test/library.sh" function cleanup() { restore_override_vars @@ -31,7 +31,7 @@ echo "@@@@ RUNNING RELEASE VALIDATION TESTS @@@@" echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" # Run tests. -./tests/presubmit-tests.sh +./test/presubmit-tests.sh echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" echo "@@@@ BUILDING THE RELEASE @@@@" diff --git a/tests/OWNERS b/test/OWNERS similarity index 100% rename from tests/OWNERS rename to test/OWNERS diff --git a/tests/columns.txt b/test/columns.txt similarity index 100% rename from tests/columns.txt rename to test/columns.txt diff --git a/tests/configmap/build.yaml b/test/configmap/build.yaml similarity index 100% rename from tests/configmap/build.yaml rename to test/configmap/build.yaml diff --git a/tests/configmap/configmap.yaml b/test/configmap/configmap.yaml similarity index 100% rename from tests/configmap/configmap.yaml rename to test/configmap/configmap.yaml diff --git a/tests/custom-env/test.yaml b/test/custom-env/test.yaml similarity index 100% rename from tests/custom-env/test.yaml rename to test/custom-env/test.yaml diff --git a/tests/custom-source/0-template.yaml b/test/custom-source/0-template.yaml similarity index 100% rename from tests/custom-source/0-template.yaml rename to test/custom-source/0-template.yaml diff --git a/tests/custom-source/1-template.yaml b/test/custom-source/1-template.yaml similarity index 100% rename from tests/custom-source/1-template.yaml rename to test/custom-source/1-template.yaml diff --git a/tests/custom-volume/test.yaml b/test/custom-volume/test.yaml similarity index 100% rename from tests/custom-volume/test.yaml rename to test/custom-volume/test.yaml diff --git a/tests/docker-basic/0-secret.yaml b/test/docker-basic/0-secret.yaml similarity index 98% rename from tests/docker-basic/0-secret.yaml rename to test/docker-basic/0-secret.yaml index 2b4921be..65edce2f 100644 --- a/tests/docker-basic/0-secret.yaml +++ b/test/docker-basic/0-secret.yaml @@ -29,5 +29,5 @@ data: # Generated by: # cat /tmp/key.json | base64 -w 100000 # This service account is JUST a storage reader on gcr.io/build-crd-testing - # (it is the same as tests/serviceaccount/secret.yaml) + # (it is the same as test/serviceaccount/secret.yaml) password: ewogICJ0eXBlIjogInNlcnZpY2VfYWNjb3VudCIsCiAgInByb2plY3RfaWQiOiAiYnVpbGQtY3JkLXRlc3RpbmciLAogICJwcml2YXRlX2tleV9pZCI6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zelFid1hQMCt4bnlxQXhFQWdkdUtCQW9HQUlNK1BTTllXQ1pYeERwU0hJMThkXG5qS2tvQWJ3Mk1veXdRSWxrZXVBbjFkWEZhZDF6c1hRR2RUcm1YeXY3TlBQKzhHWEJrbkJMaTNjdnhUaWxKSVN5XG51Y05yQ01pcU5BU24vZHE3Y1dERlVBQmdqWDE2SkgyRE5GWi9sL1VWRjNOREFKalhDczFYN3lJSnlYQjZveC96XG5hU2xxbElNVjM1REJEN3F4Unl1S3Nnaz1cbi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS1cbiIsCiAgImNsaWVudF9lbWFpbCI6ICJwdWxsLXNlY3JldC10ZXN0aW5nQGJ1aWxkLWNyZC10ZXN0aW5nLmlhbS5nc2VydmljZWFjY291bnQuY29tIiwKICAiY2xpZW50X2lkIjogIjEwNzkzNTg2MjAzMzAyNTI1MTM1MiIsCiAgImF1dGhfdXJpIjogImh0dHBzOi8vYWNjb3VudHMuZ29vZ2xlLmNvbS9vL29hdXRoMi9hdXRoIiwKICAidG9rZW5fdXJpIjogImh0dHBzOi8vYWNjb3VudHMuZ29vZ2xlLmNvbS9vL29hdXRoMi90b2tlbiIsCiAgImF1dGhfcHJvdmlkZXJfeDUwOV9jZXJ0X3VybCI6ICJodHRwczovL3d3dy5nb29nbGVhcGlzLmNvbS9vYXV0aDIvdjEvY2VydHMiLAogICJjbGllbnRfeDUwOV9jZXJ0X3VybCI6ICJodHRwczovL3d3dy5nb29nbGVhcGlzLmNvbS9yb2JvdC92MS9tZXRhZGF0YS94NTA5L3B1bGwtc2VjcmV0LXRlc3RpbmclNDBidWlsZC1jcmQtdGVzdGluZy5pYW0uZ3NlcnZpY2VhY2NvdW50LmNvbSIKfQo= diff --git a/tests/docker-basic/1-serviceaccount.yaml b/test/docker-basic/1-serviceaccount.yaml similarity index 100% rename from tests/docker-basic/1-serviceaccount.yaml rename to test/docker-basic/1-serviceaccount.yaml diff --git a/tests/docker-basic/2-build.yaml b/test/docker-basic/2-build.yaml similarity index 100% rename from tests/docker-basic/2-build.yaml rename to test/docker-basic/2-build.yaml diff --git a/tests/e2e-tests.sh b/test/e2e-tests.sh similarity index 98% rename from tests/e2e-tests.sh rename to test/e2e-tests.sh index a1dafeb9..32bb43b2 100755 --- a/tests/e2e-tests.sh +++ b/test/e2e-tests.sh @@ -47,7 +47,7 @@ function teardown() { header "Tearing down test environment" # Free resources in GCP project. if (( ! USING_EXISTING_CLUSTER )); then - ko delete --ignore-not-found=true -R -f tests/ + ko delete --ignore-not-found=true -R -f test/ ko delete --ignore-not-found=true -f config/ fi @@ -79,7 +79,7 @@ function exit_if_test_failed() { function abort_test() { echo "$1" # If formatting fails for any reason, use yaml as a fall back. - kubectl get builds -o=custom-columns-file=./tests/columns.txt || \ + kubectl get builds -o=custom-columns-file=./test/columns.txt || \ kubectl get builds -oyaml false # Force exit exit_if_test_failed @@ -181,7 +181,7 @@ kubectl delete buildtemplates --all header "Running tests" -ko apply -R -f tests/ +ko apply -R -f test/ exit_if_test_failed # Wait for tests to finish. diff --git a/tests/fail/test.yaml b/test/fail/test.yaml similarity index 100% rename from tests/fail/test.yaml rename to test/fail/test.yaml diff --git a/tests/gcs-archive/0-template.yaml b/test/gcs-archive/0-template.yaml similarity index 100% rename from tests/gcs-archive/0-template.yaml rename to test/gcs-archive/0-template.yaml diff --git a/tests/gcs-archive/1-build.yaml b/test/gcs-archive/1-build.yaml similarity index 100% rename from tests/gcs-archive/1-build.yaml rename to test/gcs-archive/1-build.yaml diff --git a/tests/git-source/0-template.yaml b/test/git-source/0-template.yaml similarity index 100% rename from tests/git-source/0-template.yaml rename to test/git-source/0-template.yaml diff --git a/tests/git-source/1-branch.yaml b/test/git-source/1-branch.yaml similarity index 100% rename from tests/git-source/1-branch.yaml rename to test/git-source/1-branch.yaml diff --git a/tests/git-source/1-ref.yaml b/test/git-source/1-ref.yaml similarity index 100% rename from tests/git-source/1-ref.yaml rename to test/git-source/1-ref.yaml diff --git a/tests/git-source/1-tag.yaml b/test/git-source/1-tag.yaml similarity index 100% rename from tests/git-source/1-tag.yaml rename to test/git-source/1-tag.yaml diff --git a/tests/git-ssh/0-secret.yaml b/test/git-ssh/0-secret.yaml similarity index 100% rename from tests/git-ssh/0-secret.yaml rename to test/git-ssh/0-secret.yaml diff --git a/tests/git-ssh/1-serviceaccount.yaml b/test/git-ssh/1-serviceaccount.yaml similarity index 100% rename from tests/git-ssh/1-serviceaccount.yaml rename to test/git-ssh/1-serviceaccount.yaml diff --git a/tests/git-ssh/2-build.yaml b/test/git-ssh/2-build.yaml similarity index 100% rename from tests/git-ssh/2-build.yaml rename to test/git-ssh/2-build.yaml diff --git a/tests/git-ssh/id_rsa b/test/git-ssh/id_rsa similarity index 100% rename from tests/git-ssh/id_rsa rename to test/git-ssh/id_rsa diff --git a/tests/git-ssh/id_rsa.pub b/test/git-ssh/id_rsa.pub similarity index 100% rename from tests/git-ssh/id_rsa.pub rename to test/git-ssh/id_rsa.pub diff --git a/tests/git-volume/test.yaml b/test/git-volume/test.yaml similarity index 100% rename from tests/git-volume/test.yaml rename to test/git-volume/test.yaml diff --git a/tests/home-volume/test.yaml b/test/home-volume/test.yaml similarity index 100% rename from tests/home-volume/test.yaml rename to test/home-volume/test.yaml diff --git a/tests/home/test.yaml b/test/home/test.yaml similarity index 100% rename from tests/home/test.yaml rename to test/home/test.yaml diff --git a/tests/library.sh b/test/library.sh similarity index 100% rename from tests/library.sh rename to test/library.sh diff --git a/tests/panic/main.go b/test/panic/main.go similarity index 100% rename from tests/panic/main.go rename to test/panic/main.go diff --git a/tests/panic/test.yaml b/test/panic/test.yaml similarity index 93% rename from tests/panic/test.yaml rename to test/panic/test.yaml index 84a230ce..66839922 100644 --- a/tests/panic/test.yaml +++ b/test/panic/test.yaml @@ -20,4 +20,4 @@ metadata: spec: steps: - name: test - image: github.com/knative/build/tests/panic + image: github.com/knative/build/test/panic diff --git a/tests/presubmit-tests.sh b/test/presubmit-tests.sh similarity index 99% rename from tests/presubmit-tests.sh rename to test/presubmit-tests.sh index 0bcf8463..1828f512 100755 --- a/tests/presubmit-tests.sh +++ b/test/presubmit-tests.sh @@ -49,7 +49,7 @@ function unit_tests() { function integration_tests() { # Make sure environment variables are intact. restore_override_vars - ./tests/e2e-tests.sh + ./test/e2e-tests.sh } # Script entry point. diff --git a/tests/reuse-git-init/test.yaml b/test/reuse-git-init/test.yaml similarity index 100% rename from tests/reuse-git-init/test.yaml rename to test/reuse-git-init/test.yaml diff --git a/tests/secret-env/build.yaml b/test/secret-env/build.yaml similarity index 100% rename from tests/secret-env/build.yaml rename to test/secret-env/build.yaml diff --git a/tests/secret-env/secret.yaml b/test/secret-env/secret.yaml similarity index 100% rename from tests/secret-env/secret.yaml rename to test/secret-env/secret.yaml diff --git a/tests/secret-volume/build.yaml b/test/secret-volume/build.yaml similarity index 100% rename from tests/secret-volume/build.yaml rename to test/secret-volume/build.yaml diff --git a/tests/secret-volume/secret.yaml b/test/secret-volume/secret.yaml similarity index 100% rename from tests/secret-volume/secret.yaml rename to test/secret-volume/secret.yaml diff --git a/tests/serviceaccount/0-serviceaccount.yaml b/test/serviceaccount/0-serviceaccount.yaml similarity index 100% rename from tests/serviceaccount/0-serviceaccount.yaml rename to test/serviceaccount/0-serviceaccount.yaml diff --git a/tests/serviceaccount/1-build.yaml b/test/serviceaccount/1-build.yaml similarity index 100% rename from tests/serviceaccount/1-build.yaml rename to test/serviceaccount/1-build.yaml diff --git a/tests/serviceaccount/secret.yaml b/test/serviceaccount/secret.yaml similarity index 100% rename from tests/serviceaccount/secret.yaml rename to test/serviceaccount/secret.yaml diff --git a/tests/step-status/build.yaml b/test/step-status/build.yaml similarity index 100% rename from tests/step-status/build.yaml rename to test/step-status/build.yaml diff --git a/tests/template-args/0-template.yaml b/test/template-args/0-template.yaml similarity index 100% rename from tests/template-args/0-template.yaml rename to test/template-args/0-template.yaml diff --git a/tests/template-args/1-build.yaml b/test/template-args/1-build.yaml similarity index 100% rename from tests/template-args/1-build.yaml rename to test/template-args/1-build.yaml diff --git a/tests/template-env-merge/0-template.yaml b/test/template-env-merge/0-template.yaml similarity index 100% rename from tests/template-env-merge/0-template.yaml rename to test/template-env-merge/0-template.yaml diff --git a/tests/template-env-merge/build.yaml b/test/template-env-merge/build.yaml similarity index 100% rename from tests/template-env-merge/build.yaml rename to test/template-env-merge/build.yaml diff --git a/tests/template-volume/0-template.yaml b/test/template-volume/0-template.yaml similarity index 100% rename from tests/template-volume/0-template.yaml rename to test/template-volume/0-template.yaml diff --git a/tests/template-volume/1-build.yaml b/test/template-volume/1-build.yaml similarity index 100% rename from tests/template-volume/1-build.yaml rename to test/template-volume/1-build.yaml diff --git a/tests/unnamed-steps/test.yaml b/test/unnamed-steps/test.yaml similarity index 100% rename from tests/unnamed-steps/test.yaml rename to test/unnamed-steps/test.yaml diff --git a/tests/workingdir/main.go b/test/workingdir/main.go similarity index 100% rename from tests/workingdir/main.go rename to test/workingdir/main.go diff --git a/tests/workingdir/test.yaml b/test/workingdir/test.yaml similarity index 100% rename from tests/workingdir/test.yaml rename to test/workingdir/test.yaml diff --git a/tests/workspace/test.yaml b/test/workspace/test.yaml similarity index 100% rename from tests/workspace/test.yaml rename to test/workspace/test.yaml