From 8689360a8199002d83c1c557953a39ee1ebfe02a Mon Sep 17 00:00:00 2001 From: Mikhail Berezovskiy Date: Sat, 15 Jul 2023 15:28:15 -0700 Subject: [PATCH] update e2etest instructions; update gitignore for local files --- .gitignore | 5 +++++ docs/developer.md | 32 +++++++++++++++++++------------- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 02afafb6..90e70330 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,8 @@ deploy.yaml # MkDocs documentation site*/ +# Multi-module go project +go.work* + +# envFile from load_env_variables.sh +**/envFile \ No newline at end of file diff --git a/docs/developer.md b/docs/developer.md index aff5d911..71430a12 100644 --- a/docs/developer.md +++ b/docs/developer.md @@ -35,22 +35,28 @@ And use "EnvFile" GoLand plugin to read the env variables from the generated `.e ### End-to-End Testing -Run the following command to run the end-to-end tests against the Kubernetes cluster pointed to by `kubectl config current-context`: -You should set up the correct `REGION` env variable and create `non-default` -namespace if it doesn't exist. - -NOTE: You'll need to allow in-bound traffics from lattice prefix list in the security -groups of your cluster. - -```bash -# create non-default namespace if it hasn't existed yet +To run end-to-end tests against your local controller you need: +- aws account and fetch credentials for "default" profile +- follow deploy.md steps, except a few last steps for controller deployment to EKS + - setup env vars + - create EKS cluster + - allow traffic from Lattice IP to EKS cluster + - create IAM OIDC provider and policy +- install CRD's (see above) +- create non-default namespace +``` kubectl create namespace non-default - -export REGION=us-west-2 -make e2etest +``` +- start local controller (in background or new session) +``` +REGION=us-west-2 make run +``` +- run tests against local controller +``` +REGION=us-west-2 make e2etest ``` -Pass `FOCUS` environment variable to run some specific test cases based on filter condition. +You can use `FOCUS` environment variable to run some specific test cases based on filter condition. You could assign the string in the Describe("xxxxxx") or It("xxxxxx") to the FOCUS environment variable to run the specific test cases. ```go var _ = Describe("HTTPRoute path matches", func() {