Skip to content

Commit

Permalink
Merge pull request #1795 from spencerhance/patch-1
Browse files Browse the repository at this point in the history
Update e2e-test README
  • Loading branch information
k8s-ci-robot authored Sep 6, 2022
2 parents 82cd95e + 26457bf commit da073a8
Showing 1 changed file with 15 additions and 2 deletions.
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 logs -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`

0 comments on commit da073a8

Please sign in to comment.