Skip to content

Commit

Permalink
Add Fallback test to psm_interop_kokoro_lib.sh (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
eugeneo authored Aug 12, 2024
1 parent 6c7830a commit 5248f51
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 2 deletions.
45 changes: 43 additions & 2 deletions .kokoro/psm_interop_kokoro_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,47 @@ psm::dualstack::run_test() {
psm::tools::run_verbose python -m "tests.${test_name}" "${PSM_TEST_FLAGS[@]}"
}

# --- Fallback TESTS ------------------

#######################################
# Fallback Test Suite setup.
#######################################
psm::fallback::setup() {
}

#######################################
# Prepares the list of tests in Fallback test suite.
# Globals:
# TESTS: Populated with tests in Fallback test suite.
#######################################
psm::fallback::get_tests() {
TESTS=(
"fallback_test"
)
}

#######################################
# Executes Fallback test case
# Globals:
# PSM_TEST_FLAGS: The array with flags for the test
# GRPC_LANGUAGE: The name of gRPC languages under test
# Arguments:
# Test case name
# Outputs:
# Writes the output of test execution to stdout, stderr
# Test xUnit report to ${TEST_XML_OUTPUT_DIR}/${test_name}/sponge_log.xml
#######################################
psm::fallback::run_test() {
local test_name="${1:?${FUNCNAME[0]} missing the test name argument}"

PSM_TEST_FLAGS+=(
"--flagfile=config/common-fallback.cfg"
)

psm::run::finalize_test_flags "${test_name}"
psm::tools::run_verbose python -m "tests.${test_name}" "${PSM_TEST_FLAGS[@]}"
}

# --- URL Map TESTS ------------------

#######################################
Expand Down Expand Up @@ -301,7 +342,7 @@ psm::csm::run_test() {
# BUILD_SCRIPT_DIR: Absolute path to the directory with lang-specific buildscript
# in the source repo.
# Arguments:
# Test suite name, one of (lb, security, dualstack, url_map, csm)
# Test suite name, one of (csm, dualstack, fallback, lb, security, url_map)
# Outputs:
# Writes the output of test execution to stdout, stderr
#######################################
Expand All @@ -316,7 +357,7 @@ psm::run() {
psm::setup::docker_image_names "${GRPC_LANGUAGE}" "${test_suite}"

case "${test_suite}" in
lb | security | dualstack | url_map | csm)
csm | dualstack | fallback | lb | security | url_map)
psm::setup::generic_test_suite "${test_suite}"
;;
*)
Expand Down
7 changes: 7 additions & 0 deletions config/common-fallback.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Common config for Fallback test
--control_plane_image=us-docker.pkg.dev/grpc-testing/psm-interop/test-control-plane:latest

# Disables the GCP Workload Identity feature to simplify permission control
--gcp_service_account=None
--private_api_key_secret_name=None
--noenable_workload_identity

0 comments on commit 5248f51

Please sign in to comment.