|
15 | 15 | # limitations under the License. |
16 | 16 |
|
17 | 17 | # This script is used to run the integration tests on OpenShift. |
18 | | -# Usage: ./integ-suite-ocp.sh TEST_SUITE SKIP_TESTS, example: /prow/integ-suite-ocp.sh telemetry "TestClientTracing|TestServerTracing" |
19 | | -# TEST_SUITE: The test suite to run. Default is "pilot". Available options are "pilot", "security", "telemetry", "helm". |
| 18 | +# Usage: ./integ-suite-ocp.sh [TEST_SUITE] [SKIP_TESTS] [SKIP_SUITE] [SPECIFIC_TESTS] |
| 19 | +# Example: ./integ-suite-ocp.sh telemetry "TestAuthZCheck|TestRevisionTags" "tracing/zipkin|policy" "TestAccessLogs|TestAccessLogsFilter" |
| 20 | +# |
| 21 | +# Parameters can also be set via environment variables: |
| 22 | +# TEST_SUITE: The test suite to run. Default is "pilot". Available options are "pilot", "security", "telemetry", "helm", "ambient". |
| 23 | +# SKIP_TESTS: The tests to skip. Default is "". e.g. "TestAuthZCheck|TestRevisionTags" |
| 24 | +# SKIP_SUITE: The test suites under main suite to skip. Default is "". e.g. "tracing/zipkin|policy" |
| 25 | +# SPECIFIC_TESTS: The specific tests ONLY to run. Default is "". e.g. "TestAccessLogs|TestAccessLogsFilter" |
| 26 | +# |
| 27 | +# Examples: |
| 28 | +# ./integ-suite-ocp.sh telemetry # Run all telemetry tests |
| 29 | +# ./integ-suite-ocp.sh telemetry "" "" "TestAccessLogs|TestAccessLogsFilter" # Run only specific tests |
| 30 | +# ./integ-suite-ocp.sh telemetry "" "tracing/zipkin" "TestAccessLogs|TestAccessLogsFilter" # Run specific tests but skip if in tracing/zipkin suite |
| 31 | +# SPECIFIC_TESTS="TestAccessLogs|TestAccessLogsFilter" ./integ-suite-ocp.sh telemetry # Same as above, using env var |
| 32 | +# SKIP_TESTS="TestAuthZCheck|TestRevisionTags" ./integ-suite-ocp.sh pilot # Skip specific tests |
| 33 | +# SKIP_SUITE="tracing/zipkin|policy" ./integ-suite-ocp.sh telemetry # Skip specific suites |
| 34 | +# |
20 | 35 | # TODO: Use the same arguments as integ-suite.kind.sh uses |
21 | 36 |
|
22 | 37 | WD=$(dirname "$0") |
23 | 38 | ROOT=$(dirname "$WD") |
24 | 39 | WD=$(cd "$WD"; pwd) |
25 | 40 | export NAMESPACE="${NAMESPACE:-"istio-system"}" |
26 | 41 | export TAG="${TAG:-"istio-testing"}" |
27 | | -SKIP_TESTS="${2:-""}" |
28 | | -TEST_SUITE="${1:-"pilot"}" |
29 | | -SKIP_SUITE="${3:-""}" |
| 42 | +TEST_SUITE="${1:-${TEST_SUITE:-"pilot"}}" |
| 43 | +SKIP_TESTS="${2:-${SKIP_TESTS:-""}}" |
| 44 | +SKIP_SUITE="${3:-${SKIP_SUITE:-""}}" |
| 45 | +SPECIFIC_TESTS="${4:-${SPECIFIC_TESTS:-""}}" |
30 | 46 | SKIP_SETUP="${SKIP_SETUP:-"false"}" |
31 | 47 | INSTALL_METALLB="${INSTALL_METALLB:-"false"}" |
32 | 48 | OPERATOR_NAMESPACE="${OPERATOR_NAMESPACE:-"sail-operator"}" |
@@ -261,6 +277,11 @@ if [ "${CONTROL_PLANE_SOURCE}" == "sail" ]; then |
261 | 277 | base_cmd+=("--istio.test.kube.controlPlaneInstaller=${SAIL_SETUP_SCRIPT}") |
262 | 278 | fi |
263 | 279 |
|
| 280 | +# Append specific tests flag if SPECIFIC_TESTS is set, e.g.: "TestTraffic|TestServices" |
| 281 | +if [ -n "${SPECIFIC_TESTS}" ]; then |
| 282 | + base_cmd+=("-run" "${SPECIFIC_TESTS}") |
| 283 | +fi |
| 284 | + |
264 | 285 | # Append skip tests flag if SKIP_TESTS is set |
265 | 286 | if [ -n "${SKIP_TESTS}" ]; then |
266 | 287 | base_cmd+=("-skip" "${SKIP_TESTS}") |
|
0 commit comments