Commit Graph

150 Commits

Author SHA1 Message Date
Eric Van Norman 061a219fc9
Update make gen to do a format-go and check in updated files (#8960)
* Update make gen to do a format-go and check in updated files

* make gen
2021-02-12 10:17:53 -08:00
John Howard 51650924c9
VMs: add doc test, re-org examples (#8892)
* Add documentation test for VMs

* Remove single and multinetwork docs, move up a level

* Fixes

* fix tests

* fix test
2021-02-04 21:31:44 -08:00
Eric Van Norman 5d984eb560
Update istio.io/istio ref to 1.9.0-beta.0 (#8562)
* Update istio/istio ref to latest master

* Move to latest before testing.

* Update release in Makefile

* Fix some tests

* Update to latest isti.io/istio again

* Update to latest istio.io/istio

* Update to latest istio.io/istio

* Update ref to latest master

* Fix instioctl-analyze

* Add back @howardjohn commit I inadvertantly deleted

* Fix lint

* Pick up new stio: fix empty iop read from stdin for operator

* go mod tidy without itermediate go gets

* Update to current stats-filter's

* Needed another 'make gen'

* More go.* changes for changes in ref'd istio/istio

* Update istio to 1.9.0-beta.0
2021-01-19 11:57:22 -08:00
Frank Budinsky a70e78f25e
Test cleanup (#8564)
* Framework inject set +e at start of cleanup test script

* tabs

* fix typo

* add nl

* fix doc
2020-11-24 16:26:19 -05:00
Nathan Mittler 616f45b1d5
Several test framework improvements (#8524)
Overview of the changes:

- Adding ability to verify that expected output occurs a number of times consecutively. This is needed for https://github.com/istio/istio.io/pull/8402.

- Moving snapshot checking logic to Go code so that it can be separated out into separate test steps, which are timed and contain their own output directories/files. This makes the code cleaner and also makes the snapshot logic more transparent.

- Updating debug.sh to use newer bash syntax that allows it to dynamically select a free file descriptor. Without this, I was seeing all commands echoed to my console in goland.
2020-11-23 09:23:54 -05:00
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
Justin Pettit 0fb1c50a49
verify.sh: Don't exit on error in _run_and_verify_*() funcs. (#7359)
* verify.sh: Don't exit on error in _run_and_verify_*() funcs.

Most tests include "set -e", which causes the script to exit if a
statement returns a non-true return value.  In some cases, the command
may exit with a non-true return value, but we want to retry the command
later.  We want to temporarily disable that "errexit" behavior.

* verify.sh: Clarify __verify_with_retry() comment and variable name.
2020-05-19 18:06:21 -07:00
Justin Pettit 7782eb1d0a
Authz jwt (#7338)
* snip.py: Replace github file token with release-specific URL.

* verify.sh: Show the expected output as well as the actual output.

* snip.py: Update the githubfile regex to not include email addresses.

When generating snip scripts, pairs of "@" signs indicate a link to
GitHub repo content.  However, JWT attribute values contained pairs of
email addresses such as:

    `testing@secure.istio.io/testing@secure.istio.io`

which would be treated as an email address and mangled.  This commit
rewrites the regex to not match on email addresses.

* Add authz-jwt user guide test.
2020-05-17 13:51:45 -04:00
Frank Budinsky 90103ae557
Cleanup circuit breaking test (#7335)
* Cleanup circuit breaking test

* remove old files

* updated expected
2020-05-15 16:59:58 -07:00
Justin Pettit 8cacec48de
Authz deny (#7315)
* Add authz-tcp user guide test.

* Add run and verify functions for user doc tests.
2020-05-14 16:10:20 -07:00
Frank Budinsky 93b889af63
Cleanup secure ingress test (#7313)
* Cleanup secure ingress test

* fix lint

* remove curl version check
2020-05-14 07:20:37 -07:00
Frank Budinsky 85f4d1d97b
Simplify TCPTrafficShiftingTest (#7308)
* Simplify TCPTrafficShiftingTest

* fix lint

* more lint

* remove --all

* fix function name
2020-05-13 17:00:35 -07:00
Eric Van Norman 109d7a565c
Fix test.kube.postsubmit no longer needing to write snippets. (#7306)
Force merge because of netlify flake
2020-05-13 15:54:18 -04:00
Frank Budinsky 4f7622e3aa
More doc testing (#7253)
* Ingress control test

* Ingress control test

* fix lint

* fix package

* fix path

* improve _verify_like

* curl -s

* debug

* fix compare

* remove flaky verify call

* fix path

* regen
2020-05-12 05:58:07 -07:00
Frank Budinsky 80443a4b6c
Cleanup and fix TCP traffic routing test (#7265)
* Cleanup and fix TCP traffic routing test

* use ingress IP

* cleanup doc

* curl 20 times
2020-05-11 17:39:55 -07:00
Justin Pettit e77f3e8e2d
Add authz-tcp user guide test. (#7176)
Force merge because of netlify flake
2020-05-11 10:25:00 -04:00
Frank Budinsky affe99f97a
More traffic management task tests (#7250)
* More traffic management task tests

* lint errors

* fix kubectl output

* fix arg check

* login to bookinfo

* curl --user

* temporary kludge for login not working

* fault injection test

* rename test

* fix cleanup

* timeouts tests

* regen

* make sure sleep pods are gone
2020-05-10 15:05:22 -07:00
Frank Budinsky dcfdce05dc
Delete all snippet generating code from istioio test framework (#7239)
* Cleanup and remove all snippet generateing from istioio test framework

* fix lint

* one more lint

* remove dead code
2020-05-08 06:07:34 -07:00
Eric Van Norman 0c196ee512
Use template for sub testcases, fix TAG for them (#7237) 2020-05-07 17:37:29 -07:00
Frank Budinsky f45bc9e1a8
Remove obsolete '# ' uses from all tests (#7233) 2020-05-06 19:17:11 -04:00
Eric Van Norman 392a2bee14
Update test framework to use 1.6.0-beta.0 (#7214)
* Update test framework to use 1.6.0-beta.0

* Go back to copies from env var

* Add more test targets, fix mtls test (new PA added)

* Update to use Istio SHA from go.mod (convert to long SHA)

* Try and remove TAG from prow

* Debug TAG not being set

* Fix paralization issue

* Remove some extra output

* Review comments
2020-05-06 10:49:27 -07:00
Oliver Liu 1e73594260
Restructure the cert management tasks. (#7209)
* Restructure the cert management tasks.

* Small fix.

* Fix references.

* Fix links

* Small fix.

* Update content/en/docs/tasks/security/cert-management/plugin-ca-cert/index.md

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

* Small fix.

* Change the weights.

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>
2020-05-04 14:57:29 -04:00
Frank Budinsky 1fe7056ffa
Partial convert mirror test to new model (#7153)
Reverted the actual mirror test script, because mirror test seems to have some subtle failure when running with what seems to be the exact same commands via snips. Will investigate further in followup PR. Merging this one to get the generator changes.
2020-04-25 12:34:24 -04:00
lei-tang 2dbb4dc02d
Fix for running user guide tests (#7136) 2020-04-23 07:31:31 -07:00
Frank Budinsky a7107678f5
Convert TCP traffic shifting test (#7131)
* Convert TCP traffic shifting test

* lint errors

* regen

* test disable spellcheck

* temporary disable gen-check

* disable inappropriate bash lint errors

* disable gen check

* one more regen

* reenable gen check

* remove -it options

* revert commands

* fix app health check outdated
2020-04-22 18:26:27 -07:00
Frank Budinsky a9541a2b42
Convert bookinfo test to new model (#7127)
* Convert bookinfo test to new model

* missing include

* Fix kubectl output

* fix elapsed time regex
2020-04-22 11:36:01 -07:00
Frank Budinsky 99d4febb16
Convert health check test to new model (#7126)
* Convert health check test to new model

* fix cleanup
2020-04-22 11:18:58 -07:00
Shamsher Ansari 290ff5fa8e
Add test for Request Timeouts (#6660)
* Add test for Request Timeouts

* Update test to extract snippets

* Apply suggestions from code review

Co-Authored-By: Frank Budinsky <frankb@ca.ibm.com>

* Fix lint error

* Use code snippets from bookinfo snips

Co-Authored-By: Frank Budinsky <frankb@ca.ibm.com>

* Remove sleep pods

* remove deprecated $snippet and use use verify func

Co-Authored-By: Frank Budinsky <frankb@ca.ibm.com>

* Skip test failure

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>
2020-04-22 10:10:28 -04:00
Eric Van Norman a8b9bd10ce
Notes on testing (#7115)
* Notes on testing

* Update tests/README.md

Co-Authored-By: Frank Budinsky <frankb@ca.ibm.com>

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>
2020-04-21 08:20:51 -07:00
lei-tang f8fd68c04b
User guide tests for DNS certificate management (#7103)
* User guide tests for DNS certificate management

- Add user guide tests for DNS certificate management
- Remove user guide's dependency on jq

* Use _verify_contains function
2020-04-21 07:32:39 -07:00
Frank Budinsky 1e7a781bdf
Add built-in verify functions to test framework (#7110)
* Add builtin verify functions to test framework

* fix lint

* tweaks

* fix bold
2020-04-20 13:29:46 -07:00
Frank Budinsky ccd4ce6faa
Document check for lint errors in generated snip.sh files (#7100)
* Document source of user confusion

* tweak
2020-04-17 11:17:20 -07:00
lei-tang 96073364ea
User guide tests and remove manual steps for plugging in CA cert (#7085)
* User guide tests and remove manual steps for plugging in CA cert

- Add user guide tests for plugging in CA cert
- Remove the manual steps in the user guide of plugging in CA cert
to make it easier for an user to try the guide.

* Fix SC2046 lint error and the trafficmanagement test errors
2020-04-17 09:16:56 -07:00
Frank Budinsky 82d4851806
Snip regen (#7084)
* Add gen-check rule

* make gen->site

* tweak

* more readme clarification
2020-04-16 08:28:58 -07:00
Frank Budinsky f2cf780bfb
Update doc test README (#7080)
* Update doc test README

* add sh

* tweaks

* formatting

* format

* fix comment

* wording

* convert mtls migration task

* Update tests/README.md

Co-Authored-By: Eric Van Norman <ericvn@us.ibm.com>

* Update tests/README.md

Co-Authored-By: Eric Van Norman <ericvn@us.ibm.com>

Co-authored-by: Eric Van Norman <ericvn@us.ibm.com>
2020-04-15 08:44:18 -07:00
Frank Budinsky 3b59501872
Generate test snippets from md files POC (#7044)
* Generate test snippets from md POC

* fixes

* fix python lint

* fix snip source

* improvements

* update snip calls

* add copyright header

* lint errors

* lint error in md instructions

* better default snip_id

* run test without snippet gen

* gofmt

* fixes

* fix path

* fixes

* fix verify
2020-04-14 07:13:44 -07:00
Brad Ison 2fc4bb4a45
Fix flaky circuit breaker test (#7043)
The `TestCircuitBreaker` test is very flaky.  It relies on examining
the percentage of requests that succeed or fail to a service with
circuit breaking configured, and ensuring the numbers fall within a
given range.  Unfortunately, the percentages tend to vary widely from
run to run, so the test fails as often as it passes.

This simplifies the test by only verifying that both successes and
failures occur instead of checking the percentage of each.
2020-04-14 06:40:17 -07:00
Brad Ison 84135ce5b3
Run examples tests under the demo profile (#7046)
Most of the tasks in the docs assume the installation is using the
demo profile, but the tests install Istio with the default profile.
At least one instance of an issue caused by this can be found in
istio/istio#21556.  This changes the example tests to run against an
installation using the demo profile.

Fixes: https://github.com/istio/istio/issues/21634
2020-04-13 07:00:19 -07:00
Brad Ison a96df3ee36
Fix mTLS migration test script (#7010)
The mTLS migration task in the docs was updated to use
PeerAuthentication instead of Policy and DestinationRules, but the
tests were never updated.  This updates the test script to be inline
with the docs.
2020-04-02 07:00:21 -07:00
Brad Ison ccf3e134d9
Fix TCP Traffic Shifting test script (#7016)
The `TestTCPTrafficShifting` test script relies on fetching the port
named "tcp" on the istio-ingressgateway service, but that port is not
present in the default installation profile -- only in the demo
profile.  This patches the service to add the port in the setup
script, and also fixes the usage of `nc` in the test script.
2020-04-01 13:44:03 -07:00
Suchith J N c2dc99c1c3
(#6837) remove istio.io test for enabling/disabling policy enforcement (#6838) 2020-03-24 06:40:13 -07:00
Nathan Mittler 404cbd180d
Update to the latest istio/istio (#6881)
There were changes to the test framework that required a few tweaks.
2020-03-16 10:08:02 -04:00
Suchith J N 798328b911
(#6586) move istio.io test for circuit breaking to istio.io repository (#6609)
* (#6586) move istio.io test for circuit breaking to istio.io repository

* (#6586) add verification for output metrics

* (#6586) widened bounds for both before and after tripping and use ruby for evaluation

* (#6586) fix istioio package import
2020-03-12 09:05:43 -07:00
Istio Automation c71ba46ef4
Updating istio/istio dependency (#6724) 2020-03-05 07:24:16 -08:00
Daniel Grimm b1a3e86a7b
Add ingress-gateway reachability to bookinfo test (#6627) 2020-02-28 15:36:32 -08:00
Shamsher Ansari a72730d3de
Add test for Enabling Policy Enforcement (#6622) 2020-02-27 09:52:05 -08:00
Nathan Mittler a804d49342
More fixes and cleanup for makefiles (#6612) 2020-02-26 14:55:25 -08:00
Nathan Mittler 10821e3a17
Fixes and cleanup for running tests (#6598) 2020-02-25 14:28:01 -08:00
Nathan Mittler a7c0724624
Copy istio.io test framework from istio/istio (#6521) 2020-02-20 10:55:35 -08:00
Nathan Mittler e97c81b700
Fix istio.io integration tests (#6489) 2020-02-20 09:28:42 -08:00
Nathan Mittler 6a4372e36d
Copy istio.io tests to istio.io repo (#6451)
Once this lands, we will work on getting them on CI
2020-02-14 14:20:10 -08:00