Skip to content

Commit 2f6d147

Browse files
committed
test: removed use of dirac-login from the tests
1 parent 3214d64 commit 2f6d147

File tree

5 files changed

+10
-61
lines changed

5 files changed

+10
-61
lines changed

tests/Integration/Framework/Test_Proxy.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@
66
# Submitter should follow through the logs
77
#
88

9-
if [[ -z ${SERVERINSTALLDIR+x} ]]; then
10-
PARAMS=""
11-
else # To run in Jenkins
12-
PARAMS="-C $SERVERINSTALLDIR/user/client.pem -K $SERVERINSTALLDIR/user/client.key"
13-
fi
14-
159
echo
1610
echo
1711
echo " ########################## REAL BASICS #############################"

tests/Integration/all_integration_client_tests.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
1212
echo -e "THIS_DIR=${THIS_DIR}" |& tee -a clientTestOutputs.txt
1313

1414
echo -e "*** $(date -u) Getting a non privileged user\n" |& tee -a clientTestOutputs.txt
15-
dirac-login -C "${SERVERINSTALLDIR}/user/client.pem" -K "${SERVERINSTALLDIR}/user/client.key" "${DEBUG}" |& tee -a clientTestOutputs.txt; (( ERR |= "${?}" ))
15+
dirac-proxy-init "${DEBUG}" |& tee -a clientTestOutputs.txt; (( ERR |= "${?}" ))
1616

1717
#-------------------------------------------------------------------------------#
1818
echo -e "*** $(date -u) **** Accounting TESTS ****\n"
@@ -29,13 +29,13 @@ pytest --no-check-dirac-environment "${THIS_DIR}/DataManagementSystem/Test_Clien
2929
echo -e "*** $(date -u) **** RMS TESTS ****\n"
3030

3131
echo -e "*** $(date -u) Getting a non privileged user\n" |& tee -a clientTestOutputs.txt
32-
dirac-login -C "${SERVERINSTALLDIR}/user/client.pem" -K "${SERVERINSTALLDIR}/user/client.key" "${DEBUG}" |& tee -a clientTestOutputs.txt
32+
dirac-proxy-init "${DEBUG}" |& tee -a clientTestOutputs.txt
3333

3434
echo -e "*** $(date -u) Starting RMS Client test as a non privileged user\n" |& tee -a clientTestOutputs.txt
3535
pytest --no-check-dirac-environment "${THIS_DIR}/RequestManagementSystem/Test_Client_Req.py" |& tee -a clientTestOutputs.txt; (( ERR |= "${?}" ))
3636

3737
echo -e "*** $(date -u) getting the prod role again\n" |& tee -a clientTestOutputs.txt
38-
dirac-login prod -C "${SERVERINSTALLDIR}/user/client.pem" -K "${SERVERINSTALLDIR}/user/client.key" "${DEBUG}" |& tee -a clientTestOutputs.txt
38+
dirac-proxy-init -g prod "${DEBUG}" |& tee -a clientTestOutputs.txt
3939
echo -e "*** $(date -u) Starting RMS Client test as an admin user\n" |& tee -a clientTestOutputs.txt
4040
pytest --no-check-dirac-environment "${THIS_DIR}/RequestManagementSystem/Test_Client_Req.py" |& tee -a clientTestOutputs.txt; (( ERR |= "${?}" ))
4141

@@ -63,7 +63,7 @@ pytest --no-check-dirac-environment "${THIS_DIR}/WorkloadManagementSystem/Test_W
6363
pytest --no-check-dirac-environment "${THIS_DIR}/WorkloadManagementSystem/Test_Client_WMS.py" |& tee -a clientTestOutputs.txt; (( ERR |= "${?}" ))
6464

6565
# Make sure we have the prod role for these tests to get the VmRpcOperator permission
66-
dirac-login prod -C "${SERVERINSTALLDIR}/user/client.pem" -K "${SERVERINSTALLDIR}/user/client.key" "${DEBUG}" |& tee -a clientTestOutputs.txt
66+
dirac-proxy-init -g prod "${DEBUG}" |& tee -a clientTestOutputs.txt
6767

6868
## no real tests
6969
python "${THIS_DIR}/WorkloadManagementSystem/createJobXMLDescriptions.py" |& tee -a clientTestOutputs.txt; (( ERR |= "${?}" ))
@@ -95,14 +95,14 @@ echo -e "*** $(date -u) **** DataManager TESTS ****\n"
9595

9696

9797
echo -e "*** $(date -u) Getting a non privileged user to find its VO dynamically\n" |& tee -a clientTestOutputs.txt
98-
dirac-login jenkins_user -C $SERVERINSTALLDIR/user/client.pem -K $SERVERINSTALLDIR/user/client.key $DEBUG |& tee -a clientTestOutputs.txt
98+
dirac-proxy-init -g jenkins_user $DEBUG |& tee -a clientTestOutputs.txt
9999

100100
userVO=$(python -c "import DIRAC; DIRAC.initialize(); from DIRAC.Core.Security.ProxyInfo import getVOfromProxyGroup; print(getVOfromProxyGroup().get('Value',''))")
101101
userVO="${userVO:-Jenkins}"
102102
echo -e "*** $(date -u) VO is "${userVO}"\n" |& tee -a clientTestOutputs.txt
103103

104104
echo -e "*** $(date -u) Getting a privileged user\n" |& tee -a clientTestOutputs.txt
105-
dirac-login jenkins_fcadmin -C "${SERVERINSTALLDIR}/user/client.pem" -K "${SERVERINSTALLDIR}/user/client.key" "${DEBUG}" |& tee -a clientTestOutputs.txt
105+
dirac-proxy-init -g jenkins_fcadmin "${DEBUG}" |& tee -a clientTestOutputs.txt
106106

107107
cat >> dataManager_create_folders <<EOF
108108
@@ -118,7 +118,7 @@ EOF
118118
dirac-dms-filecatalog-cli -f FileCatalog < dataManager_create_folders
119119

120120
echo -e "*** $(date -u) Getting a non privileged user\n" |& tee -a clientTestOutputs.txt
121-
dirac-login jenkins_user -C "${SERVERINSTALLDIR}/user/client.pem" -K "${SERVERINSTALLDIR}/user/client.key" "${DEBUG}" |& tee -a clientTestOutputs.txt
121+
dirac-proxy-init -g jenkins_user "${DEBUG}" |& tee -a clientTestOutputs.txt
122122

123123
pytest --no-check-dirac-environment "${THIS_DIR}/DataManagementSystem/Test_DataManager.py" |& tee -a clientTestOutputs.txt; (( ERR |= "${?}" ))
124124

@@ -128,7 +128,7 @@ pytest --no-check-dirac-environment "${THIS_DIR}/DataManagementSystem/Test_DataM
128128
# respectively.
129129

130130
# normal user proxy
131-
dirac-login jenkins_user -C "${SERVERINSTALLDIR}/user/client.pem" -K "${SERVERINSTALLDIR}/user/client.key" "${DEBUG}" |& tee -a clientTestOutputs.txt
131+
dirac-proxy-init -g jenkins_user "${DEBUG}" |& tee -a clientTestOutputs.txt
132132
echo -e "*** $(date -u) **** MultiVO User Metadata TESTS ****\n"
133133
python -m pytest --no-check-dirac-environment "${THIS_DIR}/DataManagementSystem/Test_UserMetadata.py" |& tee -a clientTestOutputs.txt; (( ERR |= "${?}" ))
134134

tests/Integration/all_integration_server_tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ dirac-restart-component Tornado Tornado "${DEBUG}" |& tee -a "${SERVER_TEST_OUTP
7474

7575
echo -e "*** $(date -u) Run the DFC client tests as user without admin privileges" |& tee -a "${SERVER_TEST_OUTPUT}"
7676
echo -e "*** $(date -u) Getting a non privileged user\n" |& tee -a "${SERVER_TEST_OUTPUT}"
77-
# dirac-login -C "${WORKSPACE}/ServerInstallDIR/user/client.pem" -K "${WORKSPACE}/ServerInstallDIR/user/client.key" "${DEBUG}"
77+
# dirac-proxy-init "${DEBUG}"
7878
# python "${THIS_DIR}/DataManagementSystem/Test_Client_DFC.py" |& tee -a "${SERVER_TEST_OUTPUT}"; (( ERR |= "${?}" ))
7979
diracDFCDB |& tee -a "${SERVER_TEST_OUTPUT}"
8080
python "${THIS_DIR}/DataManagementSystem/Test_FileCatalogDB.py" |& tee -a "${SERVER_TEST_OUTPUT}"; (( ERR |= "${?}" ))
@@ -90,7 +90,7 @@ fi
9090

9191
echo -e "*** $(date -u) Run it with the admin privileges" |& tee -a "${SERVER_TEST_OUTPUT}"
9292
echo -e "*** $(date -u) getting the prod role again\n" |& tee -a "${SERVER_TEST_OUTPUT}"
93-
# dirac-login prod -C "${WORKSPACE}/ServerInstallDIR/user/client.pem" -K "${WORKSPACE}/ServerInstallDIR/user/client.key" "${DEBUG}" |& tee -a "${SERVER_TEST_OUTPUT}"
93+
# dirac-proxy-init -g prod "${DEBUG}" |& tee -a "${SERVER_TEST_OUTPUT}"
9494
# python "${THIS_DIR}/DataManagementSystem/Test_Client_DFC.py" |& tee -a "${SERVER_TEST_OUTPUT}"; (( ERR |= "${?}" ))
9595
diracDFCDB |& tee -a "${SERVER_TEST_OUTPUT}"
9696
python "${THIS_DIR}/DataManagementSystem/Test_FileCatalogDB.py" |& tee -a "${SERVER_TEST_OUTPUT}"; (( ERR |= "${?}" ))

tests/Jenkins/dirac_ci.sh

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ source "${TESTCODE}/DIRAC/tests/Jenkins/utilities.sh"
9090
installSite() {
9191
echo "==> [installSite]"
9292

93-
# echo -n > "${SERVERINSTALLDIR}/dirac-ci-install.cfg"
9493
getCFGFile
9594

9695
echo "==> Fixing install.cfg file"
@@ -234,7 +233,6 @@ fullInstallDIRAC() {
234233

235234
echo "==> Restarting Configuration Server"
236235
dirac-restart-component Configuration Server -o /DIRAC/Security/UseServerCertificate=True ${DEBUG}
237-
# dirac-restart-component Tornado Tornado -o /DIRAC/Security/UseServerCertificate=True ${DEBUG}
238236

239237
#Install the Framework
240238
findDatabases 'FrameworkSystem'
@@ -279,7 +277,6 @@ fullInstallDIRAC() {
279277

280278
echo "==> Restarting Framework services"
281279
dirac-restart-component Framework '*' -o /DIRAC/Security/UseServerCertificate=True ${DEBUG}
282-
# dirac-restart-component Tornado Tornado -o /DIRAC/Security/UseServerCertificate=True ${DEBUG}
283280

284281
#Now all the rest
285282

@@ -345,9 +342,6 @@ fullInstallDIRAC() {
345342
#fix the SandboxStore and other stuff
346343
python "${TESTCODE}/DIRAC/tests/Jenkins/dirac-cfg-update-server.py" -o /DIRAC/Security/UseServerCertificate=True "${DEBUG}"
347344

348-
echo "==> Restarting Tornado Tornado"
349-
# dirac-restart-component Tornado Tornado -o /DIRAC/Security/UseServerCertificate=True ${DEBUG}
350-
351345
if [[ "${TEST_HTTPS:-Yes}" = "No" ]]; then
352346
echo "==> Restarting WorkloadManagement SandboxStore"
353347
dirac-restart-component WorkloadManagement SandboxStore -o /DIRAC/Security/UseServerCertificate=True ${DEBUG}
@@ -413,10 +407,6 @@ fullInstallDIRAC() {
413407

414408
echo "==> Restarting Configuration Server"
415409
dirac-restart-component Configuration Server -o /DIRAC/Security/UseServerCertificate=True ${DEBUG}
416-
417-
echo "==> Restarting Tornado Tornado"
418-
# dirac-restart-component Tornado Tornado -o /DIRAC/Security/UseServerCertificate=True ${DEBUG}
419-
420410
}
421411

422412

tests/Jenkins/utilities.sh

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -461,37 +461,6 @@ diracUserAndGroup() {
461461
fi
462462
}
463463

464-
465-
#.............................................................................
466-
#
467-
# diracProxies:
468-
#
469-
# Upload proxies in the ProxyDB (which is supposed to be installed...)
470-
#
471-
#.............................................................................
472-
473-
# diracProxies() {
474-
# echo '==> [diracProxies]'
475-
476-
# # Make sure DiracX is running
477-
# # And make sure it was synced
478-
# if [[ -n $TEST_DIRACX ]]; then
479-
# echo "Waiting for DiracX to be available" >&2
480-
# for i in {1..10}; do
481-
# if dirac-proxy-init "${DEBUG}"; then
482-
# break
483-
# fi
484-
# sleep 5
485-
# done
486-
# fi
487-
488-
# # group proxy
489-
# if ! dirac-proxy-init prod "${DEBUG}"; then
490-
# echo 'ERROR: dirac-init failed' >&2
491-
# exit 1
492-
# fi
493-
# }
494-
495464
#.............................................................................
496465
#
497466
# diracRefreshCS:
@@ -546,10 +515,6 @@ diracServices(){
546515
echo 'ERROR: dirac-install-component failed' >&2
547516
exit 1
548517
fi
549-
# if ! dirac-restart-component Tornado Tornado -o /DIRAC/Security/UseServerCertificate=True "${DEBUG}"; then
550-
# echo 'ERROR: could not restart Tornado' >&2
551-
# exit 1
552-
# fi
553518
done
554519
}
555520

0 commit comments

Comments
 (0)