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

Update e2e-test README #1795

Merged
merged 1 commit into from
Sep 6, 2022
Merged
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
17 changes: 15 additions & 2 deletions cmd/e2e-test/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Run tests against your cluster and GCP environment. This uses your default
cluster credentials. `-v` and `-logtostderr` will enable verbose logging:

```go
$ bin/amd64/e2e-test -run -project my-project -v 2 -logtostderr
$ bin/amd64/e2e-test -run -project my-project -v 2 -logtostderr -region my-region -network my-network

Version: "v1.1.0-183-gfaefb0f2", Commit: "faefb0f257a6c591d19a4768e3a8bc776ad14d33"
I0618 23:51:03.023843 62186 main_test.go:101] Using random seed = 1529391063023834550
Expand All @@ -63,7 +63,7 @@ To run a specific test case, you can use something similar to the command below:

```bash
# Ref https://golang.org/cmd/go/#hdr-Testing_flags.
$ bin/amd64/e2e-test -run -project my-project -v 2 -logtostderr -test.run=TestIAP
$ bin/amd64/e2e-test -run -project my-project -v 2 -logtostderr -region my-region -network my-network -test.run=TestIAP
```

Note that killing the test with `CTRL-C` will cause the existing namespace
Expand All @@ -76,6 +76,8 @@ W0618 23:51:04.157786 62186 framework.go:120] SIGINT received, cleaning up san
E0618 23:51:04.157869 62186 framework.go:129] Exiting due to SIGINT
```

To prevent the test from cleaning up the namespace sandboxes (for debugging purposes), use the flag `-destroySandboxes=false`.

### Within a cluster

The YAML resource definition `cmd/e2e-test/e2e-test.yaml` will create RBAC
Expand All @@ -90,3 +92,14 @@ $ kubectl apply -f my-e2e-test.yaml
# Check the test results:
$ kubectl log -n default ingress-e2e
```

Note: e2e-test.yaml assumes your image is build from the tip of `master` branch. If you are using a different tag or version, update the image tag in e2e-test.yaml accordingly.

## Limitations

The tests in [`ilb_test.go`](ilb_test.go) cannot be run from your local machine because they need access to the Internal HTTP(S) Load Balancer VIP provisioned by the test. There are two ways to run these tests:

1) Run the e2e-test pod in the cluster
2) Run the e2e-test binary from a VM located inside the same VPC and Region as the [ILB Proxy-Only Subnet](https://cloud.google.com/load-balancing/docs/proxy-only-subnets)

If your VPC and Region does not already have a proxy-only subnet, the test binary can create one with the flag `createILBSubnet=true`