@@ -30,7 +30,7 @@ readonly FORCE_TESTING_VERSION="${FORCE_TESTING_VERSION:-}"
30
30
readonly FORCE_IMAGE_BUILD_PSM=" ${FORCE_IMAGE_BUILD:- 0} "
31
31
32
32
# Docker
33
- # TODO(sergiitk): if can be removed when DOCKER_REGISTRY removed from buildscripts.
33
+ # TODO(sergiitk): 'if' can be removed when DOCKER_REGISTRY removed from buildscripts.
34
34
if [[ -z " ${DOCKER_REGISTRY} " ]] ; then
35
35
readonly DOCKER_REGISTRY=" us-docker.pkg.dev"
36
36
fi
@@ -59,15 +59,6 @@ psm::lb::setup() {
59
59
# TESTS: Populated with tests in the test suite.
60
60
# ######################################
61
61
psm::lb::get_tests () {
62
- # TODO(sergiitk): remove after debugging
63
- TESTS=(
64
- " app_net_test"
65
- " baseline_test"
66
- )
67
- return
68
-
69
-
70
- # TODO(sergiitk): load from env var?
71
62
TESTS=(
72
63
" affinity_test"
73
64
" api_listener_test"
@@ -92,7 +83,7 @@ psm::lb::get_tests() {
92
83
# ######################################
93
84
# Executes LB test case.
94
85
# Globals:
95
- # TBD
86
+ # PSM_TEST_FLAGS: The array with flags for the test
96
87
# Arguments:
97
88
# Test case name
98
89
# Outputs:
@@ -122,7 +113,6 @@ psm::security::setup() {
122
113
# TESTS: Populated with tests in PSM Security test suite.
123
114
# ######################################
124
115
psm::security::get_tests () {
125
- # TODO(sergiitk): load from env var?
126
116
TESTS=(
127
117
" baseline_test"
128
118
" security_test"
@@ -133,7 +123,8 @@ psm::security::get_tests() {
133
123
# ######################################
134
124
# Executes Security test case
135
125
# Globals:
136
- # TBD
126
+ # PSM_TEST_FLAGS: The array with flags for the test
127
+ # GRPC_LANGUAGE: The name of gRPC languages under test
137
128
# Arguments:
138
129
# Test case name
139
130
# Outputs:
@@ -175,7 +166,7 @@ psm::url_map::get_tests() {
175
166
# ######################################
176
167
# Executes URL Map test case
177
168
# Globals:
178
- # TBD
169
+ # PSM_TEST_FLAGS: The array with flags for the test
179
170
# Arguments:
180
171
# Test case name
181
172
# Outputs:
@@ -208,7 +199,6 @@ psm::csm::setup() {
208
199
# TESTS: Populated with tests in the test suite.
209
200
# ######################################
210
201
psm::csm::get_tests () {
211
- # TODO(sergiitk): load from env var?
212
202
TESTS=(
213
203
" gamma.gamma_baseline_test"
214
204
" gamma.affinity_test"
@@ -221,7 +211,7 @@ psm::csm::get_tests() {
221
211
# ######################################
222
212
# Executes CSM test case
223
213
# Globals:
224
- # TBD
214
+ # PSM_TEST_FLAGS: The array with flags for the test
225
215
# Arguments:
226
216
# Test case name
227
217
# Outputs:
@@ -240,7 +230,11 @@ psm::csm::run_test() {
240
230
# --- Common test run logic -----------
241
231
242
232
# ######################################
243
- # TBD
233
+ # Prepares and runs the test suite.
234
+ #
235
+ # Main entry function to be used by the buildscripts.
236
+ # Provisions necessary software, configures the test driver, and executes the test suite.
237
+ #
244
238
# Globals:
245
239
# KOKORO_ARTIFACTS_DIR
246
240
# GITHUB_REPOSITORY_NAME
@@ -281,13 +275,14 @@ psm::run() {
281
275
}
282
276
283
277
# ######################################
284
- # Executes the test suite
278
+ # Executes tests in the test suite
285
279
# Globals:
286
- # TBD
280
+ # TEST_DRIVER_FULL_DIR
281
+ # TESTS: the list of the tests to execute
287
282
# Arguments:
288
- # Test suite name
283
+ # Test suite name.
289
284
# Outputs:
290
- # TBD
285
+ # Each test to stdout.
291
286
# ######################################
292
287
psm::run::test_suite () {
293
288
local test_suite=" ${1:? ${FUNCNAME[0]} missing the test suite argument} "
@@ -302,7 +297,7 @@ psm::run::test_suite() {
302
297
}
303
298
304
299
# ######################################
305
- # Executes the test case
300
+ # Executes a single test case of given test suite.
306
301
# Globals:
307
302
# TEST_DRIVER_FLAGFILE: Relative path to test driver flagfile
308
303
# KUBE_CONTEXT: The name of kubectl context with GKE cluster access
@@ -362,7 +357,12 @@ psm::setup::generic_test_suite() {
362
357
" psm::${test_suite} ::setup"
363
358
psm::setup::test_driver
364
359
psm::build::docker_images_if_needed
360
+ psm::setup::get_tests " ${test_suite} "
361
+ }
365
362
363
+ psm::setup::get_tests () {
364
+ local test_suite=" ${1:? ${FUNCNAME[0]} missing the test suite argument} "
365
+ # TODO(sergiitk): allow to override TESTS from an env var
366
366
" psm::${test_suite} ::get_tests"
367
367
psm::tools::log " Tests in ${test_suite} test suite:"
368
368
printf -- " - %s\n" " ${TESTS[@]} "
0 commit comments