Skip to content

Instantly share code, notes, and snippets.

@jwendell
Created March 31, 2022 10:24
Show Gist options
  • Save jwendell/425ebacc16cdf6baf465a28f0e83dba3 to your computer and use it in GitHub Desktop.
Save jwendell/425ebacc16cdf6baf465a28f0e83dba3 to your computer and use it in GitHub Desktop.
  1. Make sure to checkout locally my current branch: https://github.com/jwendell/istio-maistra/tree/OSSM-1254
git checkout -b OSSM-1254 maistra-2.2
git pull https://github.com/jwendell/istio-maistra.git OSSM-1254
  1. Run just once: make clean init

  2. Edit this line in Makefile.core.mk:

$ git diff -- Makefile.core.mk
diff --git a/Makefile.core.mk b/Makefile.core.mk
index b31b1ea87c..cd9fc5fe39 100644
--- a/Makefile.core.mk
+++ b/Makefile.core.mk
@@ -217,7 +217,7 @@ default: init build test
 
 .PHONY: init
 # Downloads envoy, based on the SHA defined in the base pilot Dockerfile
-init: $(ISTIO_OUT)/istio_is_init
+init:
        mkdir -p ${TARGET_OUT}/logs
        mkdir -p ${TARGET_OUT}/release
  1. Copy your envoy binary into the right locations:
cp <your-envoy> out/linux_amd64/envoy
cp <your-envoy> out/linux_amd64/release/linux_amd64/envoy
cp <your-envoy> out/linux_amd64/release/linux_amd64/envoy-1e18f9521b289c6fbbca306da1f880bb0c3b5617
  1. (optional) Tweak the tests Makefile to run only a portion of the tests, not the whole test suite:
$ git diff -- tests/integration/tests.mk
diff --git a/tests/integration/tests.mk b/tests/integration/tests.mk
index ae5871cb29..815a5741cd 100644
--- a/tests/integration/tests.mk
+++ b/tests/integration/tests.mk
@@ -95,6 +95,11 @@ test.integration.kube.presubmit: | $(JUNIT_REPORT) check-go-tag
        ${_INTEGRATION_TEST_FLAGS} ${_INTEGRATION_TEST_SELECT_FLAGS} \
        2>&1 | tee >($(JUNIT_REPORT) > $(JUNIT_OUT))
 
+xuxa: | $(JUNIT_REPORT) check-go-tag
+       $(GO) test -p 1 -vet=off ${T} -tags=integ -run '^TestAuthorization_JWT$$' ./tests/integration/security/... -timeout 30m \
+       ${_INTEGRATION_TEST_FLAGS} ${_INTEGRATION_TEST_SELECT_FLAGS} \
+       2>&1 | tee >($(JUNIT_REPORT) > $(JUNIT_OUT))
+
 # Defines a target to run a minimal reachability testing basic traffic
 .PHONY: test.integration.kube.reachability
 test.integration.kube.reachability: | $(JUNIT_REPORT) check-go-tag
  1. Run the tests:
./prow/integ-suite-kind.sh --skip-cleanup xuxa
  1. This will take a while. It will build Istio, build all the containers, start kind and finally run the tests. While they run, inspect the namespaces & pods with oc or kubectl.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment