Skip to content

Commit 933aad6

Browse files
committed
clearer variable names, unlikely to collide with uses in iRODS and/or OS.
1 parent fcfac53 commit 933aad6

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

irods/test/scripts/test002.bats

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ PYTHON=python3
1010
# Run as ubuntu user with sudo; python_irodsclient must be installed (in either ~/.local or a virtualenv)
1111
#
1212

13-
OLD_PAM_PASSWD="test123"
14-
NEW_PAM_PASSWD="new_pass"
13+
ALICES_OLD_PAM_PASSWD="test123"
14+
ALICES_NEW_PAM_PASSWD="new_pass"
1515

1616
setup()
1717
{
18-
setup_pam_login_for_alice "$OLD_PAM_PASSWD"
18+
setup_pam_login_for_alice "$ALICES_OLD_PAM_PASSWD"
1919
}
2020

2121
teardown()
@@ -27,9 +27,9 @@ teardown()
2727
@test create_secrets_file {
2828

2929
# Old .irodsA is already created, so we delete it and alter the pam password.
30-
sudo chpasswd <<<"alice:$NEW_PAM_PASSWD"
30+
sudo chpasswd <<<"alice:$ALICES_NEW_PAM_PASSWD"
3131
rm -f ~/.irods/.irodsA
32-
$PYTHON -c "import irods.client_init; irods.client_init.write_pam_credentials_to_secrets_file('$NEW_PAM_PASSWD')"
32+
$PYTHON -c "import irods.client_init; irods.client_init.write_pam_credentials_to_secrets_file('$ALICES_NEW_PAM_PASSWD')"
3333

3434
# Define the core Python to be run, basically a minimal code block ensuring that we can authenticate to iRODS
3535
# without an exception being raised.

irods/test/scripts/test012.bats

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ PYTHON=python3
1010
# Run as ubuntu user with sudo; python_irodsclient must be installed (in either ~/.local or a virtualenv)
1111
#
1212

13-
PASSWD=test123
13+
ALICES_PAM_PASSWORD=test123
1414

1515
setup()
1616
{
1717
export SKIP_IINIT_FOR_PASSWORD=1
18-
setup_pam_login_for_alice $PASSWD
19-
SKIP_IINIT_FOR_PASSWORD=""
18+
setup_pam_login_for_alice "$ALICES_PAM_PASSWORD"
19+
unset SKIP_IINIT_FOR_PASSWORD
2020
}
2121

2222
teardown()
@@ -42,7 +42,7 @@ print ('env_auth_scheme=%s' % ses.pool.account._original_authentication_scheme)
4242

4343
# First invocation. PRC will both authenticate with pam_password, and write the generated secrets to the auth file,
4444
OUTPUT=$($PYTHON -c "import irods.client_configuration as cfg
45-
cfg.legacy_auth.pam.password_for_auto_renew = '$PASSWD'
45+
cfg.legacy_auth.pam.password_for_auto_renew = '$ALICES_PAM_PASSWORD'
4646
cfg.legacy_auth.pam.time_to_live_in_hours = 1
4747
cfg.legacy_auth.pam.store_password_to_environment = True
4848
$SCRIPT")
@@ -54,7 +54,7 @@ $SCRIPT")
5454

5555
# Second invocation. PRC will use previously generated secrets from the auth file generated in the first invocation.
5656
OUTPUT=$($PYTHON -c "import irods.client_configuration as cfg
57-
#cfg.legacy_auth.pam.password_for_auto_renew = '$PASSWD'
57+
#cfg.legacy_auth.pam.password_for_auto_renew = '$ALICES_PAM_PASSWORD'
5858
cfg.legacy_auth.pam.time_to_live_in_hours = 1
5959
cfg.legacy_auth.pam.store_password_to_environment = True
6060
$SCRIPT")

0 commit comments

Comments
 (0)