Commit Graph

95 Commits

Author SHA1 Message Date
Nathan Mittler 132c2375bc
Add wait for gateway to multicluster tests (#8346)
This required some other changes WRT verification:

- Change __cmp_like to allow for not accepting <pending> for an IP address.

- Change __verify_with_retry to use a timeout rathan than number of retries. This is a more intuitive interface and aligns with the way we do retries in istio/istio. I also got rid of exponential backoff and allow both the timeout and delay between retries to be configured.
2020-10-26 06:45:38 -07:00
Nathan Mittler b28bb174de
Fixes for multicluster tests (#8309) 2020-10-21 06:46:49 -07:00
Nathan Mittler 6be79801d1
[Test Framework] General improvements (#8312)
- Adding test output to CI artifacts directory
- Removing a few needless features/structures

Split out from #8309
2020-10-18 18:13:21 -07:00
Nathan Mittler f9a9f54eba
[Test Framework] Fixes to support multicluster (#8253)
* [Test Framework] Fixes to support multicluster

* use current context from each kubeconfig file.

* addressing comments
2020-10-02 14:05:09 -07:00
Eric Van Norman d06ddf8b6a
Update tests README note for kind cluster failure (#8260) 2020-10-02 13:26:32 -07:00
Nathan Mittler c3a3c5df0b
[Test Framework] Refactor to properly use subtests. (#8255)
This was noticed when investigating why errors are not causing the test to fail. It's not clear if this is related to the problem, but the existing logic was definitely atypical.
2020-10-02 06:05:28 -07:00
Eric Van Norman 70d361b30d
Try different timeout for tasks/security/authorization/authz-ingress (#8163)
* Try longer timeout for tasks/security/authorization/authz-ingress/test.sh

* Go back to old 5m timeout and add failure on timeout back in

* Test with individual wait_for_istio call updates

* Revert to simply changing timeout (but keep duration in output)

* Fix call

* Comment out istioctl wait call

* Add TODO remark

* Fix lint error

* Add temporary sleep until _wait_for_istio is re-enabled

* Add wait for sleep deployment to complete
2020-09-22 19:25:13 -07:00
Suchith J N 94fe1b5353
Test framework enhancement for multicluster doc test (#8160)
* test framework enhancement for multicluster doc test

* simplify multicluster test framework with setup=multicluster directive

* restore documentation comment
2020-09-21 10:43:36 -07:00
Frank Budinsky 1f1d762c81
README update (#8161)
* README update

* tweak

* missing paren
2020-09-17 15:13:09 -07:00
Eric Van Norman cc1a34f99c
Update test reference - master (#8103)
* Update test reference

* Test framework changes

* Another required change

* Update Tag to 1.8

* Pick istio/istio commit that actually exists

* Disable ISTIO_META_DNS_CAPTURE

* Add --skip-confirmation to istioctl installl commands

* Increase test timeout. First pass at fixes.

* Update to later istio/istio that fixes DNS and minor fixes

* test fixes

* Pick up go.mod `replace` changes from #8118

* Fix istioctl-analayze and mirror

* Fix mtls-migration test

* Update istio to include commit to fix egress

* Re-enable verify with fix

* Update istio/istio ref for egress fix

* Fix tasks/security/authorization/authz-td-migration - remove ns

* Shorten wait timeout so tests complete in under an hr

* Let tests continue after wait timeout

* Fix --skip-confirmation to -y and use yes | in tests

* revert yes | to echo y |

* Additional echo y fix

* Code review comments

* Change verify from same to contains as k8s 1.19 has extra warning lines.
2020-09-16 11:44:20 -07:00
Eric Van Norman 3795f41e52
Add back verify - grep out CR failures (#8141) 2020-09-15 07:36:22 -07:00
Frank Budinsky 8799da5317
Disable cluster cleanup check until missing CRDs at start of profile_… (#8137)
* Disable cluster cleanup check until missing CRDs at start of profile_none problem is fixed

* lint
2020-09-14 14:13:26 -07:00
Nathan Mittler 33859cf75f
Adding test targets for each profile (#8131)
* Adding test targets for each profile

Also bumping up timeout slightly as a temporary fix for flakes.

* addressing comments
2020-09-11 15:06:21 -07:00
Frank Budinsky 82ceae7d73
Accessing external services task test and more egress task cleanup (#8064)
* Egress tasks cleanup and final test

* cleanup

* fix lint

* regen

* strip trailing space from output

* lint

* lint

* review comment

* regen

* fixes

* ignore space

* wait for istiod

* restart sleep

* regen

* fix sleep restart

* debug

* fix check

* fix

* more debug

* more debug

* cleanup and disable last check
2020-09-09 14:39:26 -07:00
Suchith J N 28d61ab090
Automated test - Remotely access telemetry addons (both secure and insecure ways) (#8042)
* automated test - insecure remote access to telemetry addons

* Change profile to demo and add snippets to clean up DestinationRule (besides Gateway and VirtualService)

* automated doc test = secure remote access to telemetry addons through gateway

* Automated test for secure access of common telemetry addons and factor out common snippets to test_utils.sh

* moved test_utils to tests/util/addons.sh so that it can be reused across tests

* refactor addons with a more flexible deploy/undeploy function and fix naming of functions to access addons

* fix cleanup after tests

* fix sourcing

* remove verification for istio config deployment

* don't assume the existence of load-balancer in CI environment, but use _set_ingress_environment_variables instead of snippet in the documentation page

* add verification steps back

* fix output snippets and add verifications
2020-09-01 07:34:10 -07:00
Suchith J N 4b601f607e
automated test for zipkin dashboard and modify snippet generation to take boilerplate into account (#8003)
* automated test for viewing traces from zipkin dashboard (expectation is that traces are seen correctly)

* fix shellcheck linting errors

* remove verification of traces and just check if zipkin dashboard is accessible through port-forward

* Modify snippet generation logic to take {{< boilerplate >}} into account

* snippets for boilerplate

* fix shellcheck (linting) issues

* snippets generated with new logic

* automated test - check if zipkin dashboard is accessible by port-forwarding (as we cannot verify screenshot and the trace is already verified in istio/istio integration test

* clean up ZIPKIN_URL comment

* Address code review comments
1. Simplify boilerplate snippet filenames (remove .md_snips)
2. Sourced filenames should be in double quote(") instead of single quote(')

* fix gencheck_istio flake

* do not generate or include boilerplate snippets if there is not {{<text>}} in them

* fix linting errors in snip.py

* fix bug - filter out boilerplates without snippets very early
2020-08-26 08:37:50 -07:00
Frank Budinsky df5ea809a6
Update test framework readme (#7968) 2020-08-17 10:03:52 -07:00
Frank Budinsky 4801cd62fa
Verify test cleanup (#7889)
* Verify test cleanup

* disable istio-system checks

* more tolerant checks

* fix lint

* more lint

* limited check cleanup

* always check

* snapshot tweak
2020-08-11 08:19:21 -07:00
Mitch Connors cb788bb993
Print proxy status when debug fails for root cause (#7736) 2020-07-15 13:03:30 -07:00
Frank Budinsky 412f03105c
Kubernetes Ingress Test + fixes (#7662)
* Kubernetes Ingress Test + fixes

* cleanup

* fix circuit-breaking test

* fix lint

* remove -it
2020-07-06 07:54:35 -07:00
Frank Budinsky 67e181ce34
More test framework doc (#7635)
* More test framework doc

* Update tests/README.md

Co-authored-by: Hongyi Zhang <hongyizhang@google.com>

* Update tests/README.md

Co-authored-by: Hongyi Zhang <hongyizhang@google.com>

* tweak

* tweak

* increase default retry

* increase retries to 8

* fix test failing

* disable istioctl install

* fix lint

Co-authored-by: Hongyi Zhang <hongyizhang@google.com>
2020-06-30 11:06:42 -07:00
Hongyi Zhang 4406c95b2d
More cleanup of the test framework (#7640)
* more cleanup

* make go linter happy
2020-06-28 12:24:19 -07:00
Frank Budinsky 01c4cce951
Add proper wait for config calls to tests (#7620)
* Add wait for config calls to tests

* two more
2020-06-24 09:48:29 -07:00
Hongyi Zhang 691d286cf7
add junit report to build (#7599)
* add junit report

* remove istio.test.env argument
2020-06-19 14:26:25 -07:00
Eric Van Norman ee8927ea74
Update istio version for testing (#7565)
* Update istio version for testing

* Framework changes in base istio required changes

* Work on whitelist

* Remove whitelist and move to a new feature

* Another istio.io/istio update

* Another framework change - remove test suite name
2020-06-19 12:20:35 -07:00
Hongyi Zhang faa2001b9d
Remove obsolete classes in old istioio framework (#7550)
* fix bug where *_test.sh doesn't source snips.sh

* remove 'source snips.sh' from scripts

* remove obsolete classes and env variable
2020-06-15 07:23:26 -07:00
Hongyi Zhang a4f252ff2c
fix bug where *_test.sh doesn't source snips.sh (#7545)
* fix bug where *_test.sh doesn't source snips.sh

* remove 'source snips.sh' from scripts
2020-06-12 11:12:53 -07:00
Hongyi Zhang 5fbb14bedc
Convert all old tests to new tests (#7522)
* add an example task to test

* main test function: save progress

* a working example: routing request

* improve log info and error handling

* introduce makefile

* run each test as a subtest; remove common setup from test.sh

* add another test.sh: fault-injection

* improve error handling

* check test environment

* add two more test.sh files

* fix make command for istio setup

* update two test.sh files from upstream

* add comments and update README.md

* update test.sh files from upstream

* support multiple test names

* update README

* update README.md for new framework

* remove documentation of migration steps

* undo format changes

* change separation line to '# @cleanup'

* move go code and makefile from content/ to tests/

* change package name

* make for loop more readable

* change the set of auto-sourced scripts

* add docs for all functions

* approach to deal with folders with the same name

* minor fixes to ensure everything still runs

* fix make gen error

* add a TIMEOUT argument

* make sure util/debug.sh works with new framework

* make lint-go happy

* [BIG CHANGE] allow different istio setup configs

* make linters happy

* make linters happier

* changed wording and function orders

* make error return as the 2nd argument

* add TODOs

* Update content/en/docs/tasks/traffic-management/traffic-shifting/test.sh

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* Update tests/README.md

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* Update tests/README.md

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* Update tests/README.md

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* Update tests/README.md

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* Update tests/README.md

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* Update tests/README.md

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* only test english docs

* Update tests/README.md

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* allow test.sh as suffix

* move adding setup configs to tests/setup

* recommend full paths

* Update tests/README.md

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* require full test paths

* converting old tests to new tests: traffic-management and misc

* converting old tests to new tests: security

* remove old tests

* Update content/en/docs/tasks/security/cert-management/dns-cert/test.sh

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* simplify setup configs

* Update content/en/docs/tasks/security/authentication/authn-policy/test.sh

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* Update content/en/docs/tasks/security/authentication/mtls-migration/test.sh

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* Update content/en/docs/tasks/security/authorization/authz-http/test.sh

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* do not let istioctl prompt y/n

* Update content/en/docs/tasks/traffic-management/ingress/ingress-sni-passthrough/test.sh

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* Update content/en/docs/tasks/traffic-management/ingress/secure-ingress/test.sh

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* Update content/en/docs/tasks/security/cert-management/plugin-ca-cert/test.sh

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* simplify stuff

* rename dns-cert test.sh to test_broken.sh

* fix dns-cert doc and test

* remove egress=disabled

* fix test

* Update content/en/docs/tasks/observability/logs/access-log/test.sh

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* Update content/en/docs/tasks/security/authentication/authn-policy/test.sh

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>
2020-06-11 11:15:48 -07:00
Hongyi Zhang 420a54447b
Migration to a new framework for doc testing (#7465)
* add an example task to test

* main test function: save progress

* a working example: routing request

* improve log info and error handling

* introduce makefile

* run each test as a subtest; remove common setup from test.sh

* add another test.sh: fault-injection

* improve error handling

* check test environment

* add two more test.sh files

* fix make command for istio setup

* update two test.sh files from upstream

* add comments and update README.md

* update test.sh files from upstream

* support multiple test names

* update README

* update README.md for new framework

* remove documentation of migration steps

* undo format changes

* change separation line to '# @cleanup'

* move go code and makefile from content/ to tests/

* change package name

* make for loop more readable

* change the set of auto-sourced scripts

* add docs for all functions

* approach to deal with folders with the same name

* minor fixes to ensure everything still runs

* fix make gen error

* add a TIMEOUT argument

* make sure util/debug.sh works with new framework

* make lint-go happy

* [BIG CHANGE] allow different istio setup configs

* make linters happy

* make linters happier

* changed wording and function orders

* make error return as the 2nd argument

* add TODOs

* Update content/en/docs/tasks/traffic-management/traffic-shifting/test.sh

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* Update tests/README.md

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* Update tests/README.md

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* Update tests/README.md

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* Update tests/README.md

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* Update tests/README.md

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* Update tests/README.md

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* only test english docs

* Update tests/README.md

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* allow test.sh as suffix

* move adding setup configs to tests/setup

* recommend full paths

* Update tests/README.md

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* require full test paths

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>
2020-06-09 14:11:53 -07:00
Frank Budinsky 669e35b3ea
Cleanup access log test (#7513) 2020-06-09 13:39:59 -07:00
Iris 2bb1952f32
add test for Access log (#7423)
* add test for access log

* fix k8s test

* fix k8s test
2020-06-09 06:59:09 -07:00
Eric Van Norman e8f18494dd
Update istio sha for tests to current `master` from `release-1.6` (#7430)
* Update istio sha for tests to current `master` from `release-1.6`

* Update to latest `master` sha

* Change ISTIO_IMAGE_VERSION to match master

* Increase retries for flakiness

* Pick up istio release with egress fix

* Fix for flakiness
2020-06-05 10:48:49 -07:00
Frank Budinsky b3e79edd95
Rename _run_and_verify_xxx functions to _verify_xxx (#7452)
* Remove _verify_ calls

* Rename _run_and_verify functions to _verify

* Update tests/configuration/scripts/liveness_and_readiness_probes.sh

* error exit

* cleaner errexit
2020-06-03 06:24:29 -07:00
Frank Budinsky 3093ddc581
New verify function: _run_and_verify_lines (#7451)
* New verify function: _run_and_verify_lines

* fix lint
2020-06-02 11:23:43 -07:00
Justin Pettit 07014794c6
Fix missing "sample_" function conversions. (#7442)
These were lost in a merge.
2020-06-01 14:05:55 -07:00
Justin Pettit c709c976da
Move generally useful "sample_" functions to new "helpers.sh". (#7441) 2020-06-01 13:09:30 -07:00
Frank Budinsky f129da0ee7
Verify function improvements (#7440) 2020-06-01 11:16:15 -07:00
Justin Pettit 877b438829
Authn policy (#7433)
* authn-policy: Point users to Istio installation guide.

Have users install Istio through the installation guide instead of
explicitly instructing them to run "istioctl manifest apply" in the
task.  This will make it easier to automate the task later.

* authn-policy: Make steps and expected response clear for testing.

* Add authn-policy user guide test.
2020-05-29 12:11:47 -07:00
Frank Budinsky 55a4416230
Remove temporary login kludge (#7429) 2020-05-29 09:04:07 -07:00
Frank Budinsky c4e7daaa99
Add make test_status command (#7417)
* Add make test_status command

* improvement
2020-05-27 13:34:26 -07:00
Lin Sun a5fceca006
add a test for ingress SNI passthrough (#7380)
* add a test

* fix path

* fix lint 1

* fix lint 2

* hope to get lint pass now

* Update content/en/docs/tasks/traffic-management/ingress/ingress-sni-passthrough/index.md

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* Update content/en/docs/tasks/traffic-management/ingress/ingress-sni-passthrough/index.md

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* Update tests/trafficmanagement/ingress/scripts/ingress_sni_passthrough.sh

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* Update tests/trafficmanagement/ingress/scripts/ingress_sni_passthrough.sh

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* Update tests/trafficmanagement/ingress/scripts/ingress_sni_passthrough.sh

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* Update tests/trafficmanagement/ingress/scripts/ingress_sni_passthrough.sh

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* Update tests/trafficmanagement/ingress/scripts/ingress_sni_passthrough.sh

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* add fix from frank

* fix name

* update output

* mark test: yes

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>
2020-05-27 11:38:07 -07:00
Frank Budinsky e11cf24f0d
Add test: attribute to all md files (#7413) 2020-05-27 09:11:26 -07:00
Justin Pettit 21e03db9d9
Add authz-ingress user guide test. (#7407) 2020-05-27 06:40:06 -07:00
Frank Budinsky 77d3dc6bf1
Fix mirroring test (#7399)
* Fix mirroring test

* fix typo

* fixes

* export vars

* lint
2020-05-26 12:57:19 -07:00
Frank Budinsky b5f5fd897d
Update tests README + small fixes (#7395)
* Update tests README + small fixes

* lint

* wording tweaks
2020-05-25 15:14:39 -07:00
Frank Budinsky a0c11bc65a
Cleanup remaining tests (#7389)
* Cleanup bookinfo test

* fix test name

* convert txt to sh files

* combine scripts

* lint

* txt2sh

* remove trailing spaces

* fault_injection script

* remove WaitForPods

* wait sleep
2020-05-25 12:18:50 -07:00
Frank Budinsky 4e0103110d
Cleanup mirroring test (#7387)
* Cleanup mirroring test

* sleep

* fix mtls-migr cleanup

* debug

* debug2

* debug3

* debug4
2020-05-24 14:35:09 -07:00
John Howard e9e963a617
Add TLS origination doc test (#7367)
* Add TLS origination doc test

* Fix build

* Add header

* lint
2020-05-21 14:10:26 -07:00
Frank Budinsky e0e8648fe5
Clean up traffic shifting test (#7369)
* Clean up traffic shifting test

* add var

* v1beta1
2020-05-21 06:31:45 -07:00
Justin Pettit 5f89f64d49
debug.sh: Add debugging to test runs. (#7370)
When tests are run, shell script debugging is enabled and written to a
file called "<script_name>_debug.txt" in the same directory as the
"<script_name>_output.txt" file.
2020-05-20 20:27:44 -07:00