From 5ae13209656fc2b12a961ce0b2503184ab3d2f93 Mon Sep 17 00:00:00 2001 From: David Cheung Date: Fri, 3 Nov 2023 08:16:28 +0000 Subject: [PATCH] Add explanation for possible change reversion, and PR requirements. * Add warning on break changes will be reverted. * Add requirement for new recipe PR, and example for the required output. --- test/README.md | 4 ++- test/test-example/output-example.txt | 54 ++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 test/test-example/output-example.txt diff --git a/test/README.md b/test/README.md index 002f4694..8f9055fe 100644 --- a/test/README.md +++ b/test/README.md @@ -18,6 +18,8 @@ limitations under the License. The tests here are intended to test the recipes in this repo to make sure it workable and up-to-date. +PLEASE NOTE: All recipe tests are run periodically to ensure they are all passed. If a new recipe or changes to an existing recipe causes test failures, it will be reverted. + ## Running tests locally Make sure you have valid credentials for accessing GCP: @@ -75,7 +77,7 @@ To cleanup all tests separately, use the following command from test/: ## Adding a new recipe test -For a new recipe, in addition to its yaml file and REAME.md, it should also include a set of test files to make sure the recipe is functional and up-to-date. +For a new recipe, in addition to its yaml file and REAME.md, it should also include a set of test files to make sure the recipe is functional and up-to-date. In the description section of the pull request, you should also provide the result of `make test` tp show your test is passing and is not breaking any other existing tests. See example in [output-example.txt](./test_example/output_example.txt). A recipe directory should have the following layout: ``` diff --git a/test/test-example/output-example.txt b/test/test-example/output-example.txt new file mode 100644 index 00000000..b3250817 --- /dev/null +++ b/test/test-example/output-example.txt @@ -0,0 +1,54 @@ +bin/recipes-test \ + --run-in-prow=false \ + --boskos-resource-type=gke-internal-project \ + -test.v \ + -test.timeout=180m +I1103 06:57:28.596928 2794931 main_test.go:42] Flags: {boskosResourceType:gke-internal-project inProw:false} +=== RUN TestHelloWorld +I1103 06:57:28.597120 2794931 main_test.go:84] Hello world +--- PASS: TestHelloWorld (0.00s) +=== RUN TestRecipe +=== RUN TestRecipe/ingress-asm-multi-backendconfig +=== PAUSE TestRecipe/ingress-asm-multi-backendconfig +=== RUN TestRecipe/ingress-cloudarmor +=== PAUSE TestRecipe/ingress-cloudarmor +=== RUN TestRecipe/ingress-custom-default-backend +=== PAUSE TestRecipe/ingress-custom-default-backend +=== RUN TestRecipe/ingress-custom-grpc-health-check +=== PAUSE TestRecipe/ingress-custom-grpc-health-check +=== RUN TestRecipe/ingress-custom-http-health-check +=== PAUSE TestRecipe/ingress-custom-http-health-check +=== RUN TestRecipe/ingress-external-basic +=== PAUSE TestRecipe/ingress-external-basic +=== RUN TestRecipe/ingress-https +=== PAUSE TestRecipe/ingress-https +=== RUN TestRecipe/ingress-iap +=== PAUSE TestRecipe/ingress-iap +=== RUN TestRecipe/ingress-internal-basic +=== PAUSE TestRecipe/ingress-internal-basic +=== RUN TestRecipe/ingress-nginx +=== PAUSE TestRecipe/ingress-nginx +=== CONT TestRecipe/ingress-asm-multi-backendconfig +=== CONT TestRecipe/ingress-external-basic +=== CONT TestRecipe/ingress-custom-grpc-health-check + recipe_test.go:65: stat("ingress/single-cluster/ingress-custom-grpc-health-check/setup.sh") = stat ingress/single-cluster/ingress-custom-grpc-health-check/setup.sh: no such file or directory + recipe_test.go:66: Skipping test "ingress/single-cluster/ingress-custom-grpc-health-check": "ingress/single-cluster/ingress-custom-grpc-health-check/setup.sh" doesn't exist +=== CONT TestRecipe/ingress-nginx +=== CONT TestRecipe/ingress-internal-basic +=== CONT TestRecipe/ingress-custom-http-health-check +=== CONT TestRecipe/ingress-custom-default-backend +=== CONT TestRecipe/ingress-iap +=== CONT TestRecipe/ingress-https +=== CONT TestRecipe/ingress-cloudarmor +--- PASS: TestRecipe (0.00s) + --- SKIP: TestRecipe/ingress-custom-grpc-health-check (0.00s) + --- PASS: TestRecipe/ingress-nginx (985.15s) + --- PASS: TestRecipe/ingress-custom-default-backend (1253.93s) + --- PASS: TestRecipe/ingress-internal-basic (1263.71s) + --- PASS: TestRecipe/ingress-cloudarmor (1292.18s) + --- PASS: TestRecipe/ingress-external-basic (1330.15s) + --- PASS: TestRecipe/ingress-custom-http-health-check (1417.95s) + --- PASS: TestRecipe/ingress-asm-multi-backendconfig (1692.30s) + --- PASS: TestRecipe/ingress-iap (2156.83s) + --- PASS: TestRecipe/ingress-https (3115.15s) +PASS \ No newline at end of file