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

Rename example test files, and add requirement for new recipes. #181

Merged
merged 2 commits into from
Nov 13, 2023
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
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` to show your test is passing and is not breaking other tests. See example in [output-example.txt](./test_example/output_example.txt).

A recipe directory should have the following layout:
```
Expand Down
File renamed without changes.
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
File renamed without changes.
File renamed without changes.