Skip to content

Commit 7ccceab

Browse files
committed
[_362][_3} fix test setup conditions
1 parent 6f766ff commit 7ccceab

File tree

1 file changed

+14
-18
lines changed

1 file changed

+14
-18
lines changed

irods/test/PRC_issue_362.bats

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,36 @@
44
. $BATS_TEST_DIRNAME/scripts/funcs
55

66
setup() {
7-
[ $BATS_TEST_NUMBER = 1 ] && echo "---" >/tmp/PRC_test_issue_362
8-
local name=${BATS_TEST_DESCRIPTION##*_}
9-
10-
## Arrange for secrets file to be generated internally by the Python client
11-
cat >~/.python_irodsclient <<-EOF
12-
legacy_auth.pam.store_password_to_environment True
13-
legacy_auth.pam.password_for_auto_renew 'my${CHR}pass'
14-
legacy_auth.pam.time_to_live_in_hours 1
15-
EOF
167

178
iinit_as_rods
189

19-
if [ ! -e /tmp/rodsuser_alissa_created ]; then
20-
iadmin mkuser alissa rodsuser
21-
fi
22-
touch /tmp/rodsuser_alissa_created
23-
24-
_begin_pam_environment_and_password "" alissa
25-
rm -f ~/.irods/.irodsA
10+
setup_pam_login_for_user "test123" alice
2611

2712
cat >~/test_get_home_coll.py <<-EOF
2813
import irods.test.helpers as h
2914
ses = h.make_session()
3015
home_coll = h.home_collection(ses)
3116
exit(0 if ses.collections.get(home_coll).path == home_coll
32-
and ses.pool.account._original_authentication_scheme.lower().startswith('pam')
17+
and ses.pool.account._original_authentication_scheme.lower() in ('pam','pam_password')
3318
else 1)
3419
EOF
3520
}
3621

22+
teardown() {
23+
iinit_as_rods
24+
finalize_pam_login_for_user alice
25+
}
26+
3727
prc_test()
3828
{
3929
local CHR="$1"
40-
local USER="alissa"
30+
## Arrange for secrets file to be generated internally by the Python client
31+
cat >~/.python_irodsclient <<-EOF
32+
legacy_auth.pam.store_password_to_environment True
33+
legacy_auth.pam.password_for_auto_renew 'my${CHR}pass'
34+
legacy_auth.pam.time_to_live_in_hours 1
35+
EOF
36+
local USER="alice"
4137
local PASSWORD="my${CHR}pass"
4238
sudo chpasswd <<<"$USER:$PASSWORD"
4339
env PYTHON_IRODSCLIENT_CONFIGURATION_PATH='' python ~/test_get_home_coll.py

0 commit comments

Comments
 (0)