Skip to content

Commit 37a2003

Browse files
committed
Perlmutter fixes
1 parent 1eb3ad4 commit 37a2003

File tree

1 file changed

+44
-15
lines changed

1 file changed

+44
-15
lines changed

tests/integration/bash_tests/run_from_any/globus_auth.bash

Lines changed: 44 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ test_single_auth_code()
125125
check_log_has "INFO: Token file ${TOKEN_FILE} does NOT exist. This means we won't be able to load tokens from it." ${case_name}.log
126126
# From get_local_endpoint_id
127127
check_log_has "INFO: Writing to empty ${INI_PATH}" ${case_name}.log
128-
check_log_has "INFO: Setting local_endpoint_id based on FQDN chrlogin2.lcrc.anl.gov:" ${case_name}.log
128+
check_log_has "INFO: Setting local_endpoint_id based on" ${case_name}.log
129129
# From get_transfer_client_with_auth
130130
check_log_has "INFO: No stored tokens found - starting authentication" ${case_name}.log
131131
check_log_has "Please go to this URL and login:" ${case_name}.log # Our one expected authentication prompt
@@ -148,7 +148,7 @@ test_single_auth_code()
148148
check_log_has "INFO: Token file ${TOKEN_FILE} exists. We can try to load tokens from it." ${case_name}.log # Differs from run1
149149
# From get_local_endpoint_id
150150
check_log_has "INFO: Setting local_endpoint_id based on ${INI_PATH}" ${case_name}.log # Differs from run1
151-
check_log_has "INFO: Setting local_endpoint_id based on FQDN chrlogin2.lcrc.anl.gov:" ${case_name}.log
151+
check_log_has "INFO: Setting local_endpoint_id based on" ${case_name}.log
152152
# From get_transfer_client_with_auth
153153
check_log_has "INFO: Found stored refresh token - using it" ${case_name}.log # Differs from run1
154154
check_log_does_not_have "Please go to this URL and login:" ${case_name}.log # There should be no login prompts for run2!
@@ -296,11 +296,45 @@ test_different_endpoint3()
296296

297297
# Command line parameters:
298298
try_num="$1"
299-
path_to_repo="$2" # /home/ac.forsyth2/ez/zstash, /global/homes/f/forsyth/ez/zstash, /qfs/people/fors729/ez/zstash
300-
chrysalis_dst_basedir="$3" # /home/ac.forsyth2/zstash_tests
301-
perlmutter_dst_basedir="$4" # /global/homes/f/forsyth/zstash_tests
302-
hpss_dst_basedir="$5" # /home/f/forsyth/zstash_tests
303-
compy_dst_basedir="$6" # /compyfs/fors729/zstash_tests (/qfs/people/fors729/ => permission denied)
299+
src_machine="$2" # chrysalis, perlmutter, compy
300+
path_to_repo="$3" # /home/ac.forsyth2/ez/zstash, /global/homes/f/forsyth/ez/zstash, /qfs/people/fors729/ez/zstash
301+
chrysalis_dst_basedir="$4" # /home/ac.forsyth2/zstash_tests
302+
perlmutter_dst_basedir="$5" # /global/homes/f/forsyth/zstash_tests
303+
hpss_dst_basedir="$6" # /home/f/forsyth/zstash_tests
304+
compy_dst_basedir="$7" # /compyfs/fors729/zstash_tests (/qfs/people/fors729/ => permission denied)
305+
306+
chrysalis_dst_dir=${chrysalis_dst_basedir}/test_globus_auth_try${try_num}
307+
perlmutter_dst_dir=${perlmutter_dst_basedir}/test_globus_auth_try${try_num}
308+
hpss_dst_dir=${hpss_dst_basedir}/test_globus_auth_try${try_num}
309+
compy_dst_dir=${compy_dst_basedir}/test_globus_auth_try${try_num}
310+
311+
# Determine which endpoints to use for the endpoint-switching tests
312+
# switch1 should never be the last-tested endpoint (i.e., compy)
313+
# Neither switch1 nor switch2 should be the src endpoint.
314+
case ${src_machine} in
315+
chrysalis)
316+
dst_endpoint_switch1=NERSC_PERLMUTTER_ENDPOINT
317+
dst_endpoint_switch2=NERSC_HPSS_ENDPOINT
318+
dst_dir_switch1=${perlmutter_dst_dir}
319+
dst_dir_switch2=${hpss_dst_dir}
320+
;;
321+
perlmutter)
322+
dst_endpoint_switch1=LCRC_IMPROV_DTN_ENDPOINT
323+
dst_endpoint_switch2=PIC_COMPY_DTN_ENDPOINT
324+
dst_dir_switch1=${chrysalis_dst_dir}
325+
dst_dir_switch2=${compy_dst_dir}
326+
;;
327+
compy)
328+
dst_endpoint_switch1=NERSC_PERLMUTTER_ENDPOINT
329+
dst_endpoint_switch2=NERSC_HPSS_ENDPOINT
330+
dst_dir_switch1=${perlmutter_dst_dir}
331+
dst_dir_switch2=${hpss_dst_dir}
332+
;;
333+
*)
334+
echo "Unknown machine name: ${src_machine}" >&2
335+
exit 1
336+
;;
337+
esac
304338

305339
echo "You may wish to clear your dst directories for a fresh start:"
306340
echo "Chrysalis: rm -rf ${chrysalis_dst_basedir}/test_globus_auth*"
@@ -315,11 +349,6 @@ if ! confirm "Is the try_num correct?"; then
315349
exit 1
316350
fi
317351

318-
chrysalis_dst_dir=${chrysalis_dst_basedir}/test_globus_auth_try${try_num}
319-
perlmutter_dst_dir=${perlmutter_dst_basedir}/test_globus_auth_try${try_num}
320-
hpss_dst_dir=${hpss_dst_basedir}/test_globus_auth_try${try_num}
321-
compy_dst_dir=${compy_dst_basedir}/test_globus_auth_try${try_num}
322-
323352
echo "Go to https://app.globus.org/file-manager?two_pane=true > For "Collection", choose each of the following endpoints and, if needed, authenticate:"
324353
echo "LCRC Improv DTN, NERSC Perlmutter, NERSC HPSS, pic#compy-dtn"
325354
if ! confirm "Have you authenticated into all endpoints?"; then
@@ -340,11 +369,11 @@ test_single_auth_code ${path_to_repo} PIC_COMPY_DTN_ENDPOINT ${compy_dst_dir}
340369
echo "Follow-up tests: behavior when switching to different endpoints"
341370
echo "NOTE: if you commented out tests above, and your last endpoint used was NERSC_PERLMUTTER_ENDPOINT, the following test will not work properly."
342371
echo "Test 1: What if we switch to a different endpoint? #####################"
343-
test_different_endpoint1 ${path_to_repo} NERSC_PERLMUTTER_ENDPOINT ${perlmutter_dst_dir}
372+
test_different_endpoint1 ${path_to_repo} ${dst_endpoint_switch1} ${dst_dir_switch1}
344373
echo "Test 2: What if we try a) revoking consents and then b) removing the token file? ###"
345-
test_different_endpoint2 ${path_to_repo} NERSC_PERLMUTTER_ENDPOINT ${perlmutter_dst_dir}
374+
test_different_endpoint2 ${path_to_repo} ${dst_endpoint_switch1} ${dst_dir_switch1}
346375
echo "Test 3: What if we switch to a different endpoint again, but first remove the token file? ###"
347-
test_different_endpoint3 ${path_to_repo} NERSC_HPSS_ENDPOINT ${hpss_dst_dir}
376+
test_different_endpoint3 ${path_to_repo} ${dst_endpoint_switch2} ${dst_dir_switch2}
348377
echo "Check https://auth.globus.org/v2/web/consents > Globus Endpoint Performance Monitoring: you should have *two* consents there now."
349378
if ! confirm "Does https://auth.globus.org/v2/web/consents > Globus Endpoint Performance Monitoring show *two* consents?"; then
350379
exit 1

0 commit comments

Comments
 (0)