Skip to content

Commit

Permalink
Add explanation for possible change reversion, and PR requirements.
Browse files Browse the repository at this point in the history
* Add warning on break changes will be reverted.
* Add requirement for new recipe PR, and example for the required
  output.
  • Loading branch information
sawsa307 committed Nov 13, 2023
1 parent 7958c07 commit 5ae1320
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
```
Expand Down
54 changes: 54 additions & 0 deletions test/test-example/output-example.txt
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 5ae1320

Please sign in to comment.