Skip to content

Commit 809a892

Browse files
committed
test: added pilot user and group
1 parent df394d7 commit 809a892

File tree

4 files changed

+22
-14
lines changed

4 files changed

+22
-14
lines changed

tests/Integration/Framework/Test_UserProfileClient.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def test_storeRetrieveDelete():
3838

3939
retVal = up.listAvailableVars()
4040
assert retVal["OK"], retVal
41-
assert retVal["Value"] == [["adminusername", currentGroup, "vo", key]]
41+
assert retVal["Value"] == [["ciuser", currentGroup, "vo", key]]
4242

4343
retVal = up.getUserProfiles()
4444
assert retVal["OK"], retVal

tests/Integration/all_integration_client_tests.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ pytest --no-check-dirac-environment "${THIS_DIR}/AccountingSystem/Test_DataStore
2020
pytest --no-check-dirac-environment "${THIS_DIR}/AccountingSystem/Test_ReportsClient.py" |& tee -a clientTestOutputs.txt; (( ERR |= "${?}" ))
2121

2222

23-
#-------------------------------------------------------------------------------#
24-
echo -e "*** $(date -u) **** FTS TESTS ****\n"
25-
pytest --no-check-dirac-environment "${THIS_DIR}/DataManagementSystem/Test_Client_FTS3.py" |& tee -a "${SERVER_TEST_OUTPUT}"; (( ERR |= "${?}" ))
26-
27-
2823
#-------------------------------------------------------------------------------#
2924
echo -e "*** $(date -u) **** RMS TESTS ****\n"
3025

tests/Integration/all_integration_server_tests.sh

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ pytest --no-check-dirac-environment "${THIS_DIR}/WorkloadManagementSystem/Test_P
5454
pytest --no-check-dirac-environment "${THIS_DIR}/WorkloadManagementSystem/Test_SandboxMetadataDB.py" |& tee -a "${SERVER_TEST_OUTPUT}"; (( ERR |= "${?}" ))
5555
# pytest --no-check-dirac-environment "${THIS_DIR}/WorkloadManagementSystem/Test_JobCleaningAgent.py" |& tee -a "${SERVER_TEST_OUTPUT}"; (( ERR |= "${?}" ))
5656

57+
#-------------------------------------------------------------------------------#
58+
echo -e "*** $(date -u) **** RMS TESTS ****\n"
59+
pytest --no-check-dirac-environment "${THIS_DIR}/RequestManagementSystem/Test_ReqDB.py" |& tee -a "${SERVER_TEST_OUTPUT}"; (( ERR |= "${?}" ))
60+
5761
#-------------------------------------------------------------------------------#
5862
echo -e "*** $(date -u) **** DMS TESTS ****\n"
5963
pytest --no-check-dirac-environment "${THIS_DIR}/DataManagementSystem/Test_DataIntegrityDB.py" |& tee -a "${SERVER_TEST_OUTPUT}"; (( ERR |= "${?}" ))
@@ -70,12 +74,11 @@ echo -e "*** $(date -u) Restart the DFC service (required for Test_Client_DFC)\
7074
if [[ "${TEST_HTTPS:-Yes}" = "No" ]]; then
7175
dirac-restart-component DataManagement FileCatalog "${DEBUG}" |& tee -a "${SERVER_TEST_OUTPUT}"
7276
fi
73-
dirac-restart-component Tornado Tornado "${DEBUG}" |& tee -a "${SERVER_TEST_OUTPUT}"
7477

7578
echo -e "*** $(date -u) Run the DFC client tests as user without admin privileges" |& tee -a "${SERVER_TEST_OUTPUT}"
7679
echo -e "*** $(date -u) Getting a non privileged user\n" |& tee -a "${SERVER_TEST_OUTPUT}"
77-
# dirac-proxy-init "${DEBUG}"
78-
# python "${THIS_DIR}/DataManagementSystem/Test_Client_DFC.py" |& tee -a "${SERVER_TEST_OUTPUT}"; (( ERR |= "${?}" ))
80+
dirac-proxy-init -C /ca/certs/client.pem -K /ca/certs/client.key "${DEBUG}"
81+
python "${THIS_DIR}/DataManagementSystem/Test_Client_DFC.py" |& tee -a "${SERVER_TEST_OUTPUT}"; (( ERR |= "${?}" ))
7982
diracDFCDB |& tee -a "${SERVER_TEST_OUTPUT}"
8083
python "${THIS_DIR}/DataManagementSystem/Test_FileCatalogDB.py" |& tee -a "${SERVER_TEST_OUTPUT}"; (( ERR |= "${?}" ))
8184

@@ -86,19 +89,19 @@ echo -e "*** $(date -u) Restart the DFC service (required for Test_Client_DFC)\
8689
if [[ "${TEST_HTTPS:-Yes}" = "No" ]]; then
8790
dirac-restart-component DataManagement FileCatalog "${DEBUG}" |& tee -a "${SERVER_TEST_OUTPUT}"
8891
fi
89-
# dirac-restart-component Tornado Tornado "${DEBUG}" |& tee -a "${SERVER_TEST_OUTPUT}"
9092

9193
echo -e "*** $(date -u) Run it with the admin privileges" |& tee -a "${SERVER_TEST_OUTPUT}"
9294
echo -e "*** $(date -u) getting the prod role again\n" |& tee -a "${SERVER_TEST_OUTPUT}"
93-
# dirac-proxy-init -g prod "${DEBUG}" |& tee -a "${SERVER_TEST_OUTPUT}"
94-
# python "${THIS_DIR}/DataManagementSystem/Test_Client_DFC.py" |& tee -a "${SERVER_TEST_OUTPUT}"; (( ERR |= "${?}" ))
95+
dirac-proxy-init -g prod -C /ca/certs/client.pem -K /ca/certs/client.key "${DEBUG}" |& tee -a "${SERVER_TEST_OUTPUT}"
96+
python "${THIS_DIR}/DataManagementSystem/Test_Client_DFC.py" |& tee -a "${SERVER_TEST_OUTPUT}"; (( ERR |= "${?}" ))
9597
diracDFCDB |& tee -a "${SERVER_TEST_OUTPUT}"
9698
python "${THIS_DIR}/DataManagementSystem/Test_FileCatalogDB.py" |& tee -a "${SERVER_TEST_OUTPUT}"; (( ERR |= "${?}" ))
9799

98100

99101
#-------------------------------------------------------------------------------#
100-
echo -e "*** $(date -u) **** RMS TESTS ****\n"
101-
pytest --no-check-dirac-environment "${THIS_DIR}/RequestManagementSystem/Test_ReqDB.py" |& tee -a "${SERVER_TEST_OUTPUT}"; (( ERR |= "${?}" ))
102+
echo -e "*** $(date -u) **** FTS TESTS ****\n"
103+
# I know, it says Client, but it also instantiates a DB, so it needs to be here
104+
pytest --no-check-dirac-environment "${THIS_DIR}/DataManagementSystem/Test_Client_FTS3.py" |& tee -a "${SERVER_TEST_OUTPUT}"; (( ERR |= "${?}" ))
102105

103106
#-------------------------------------------------------------------------------#
104107
echo -e "*** $(date -u) **** Resources TESTS ****\n"

tests/Jenkins/utilities.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,11 @@ diracUserAndGroup() {
351351
exit 1
352352
fi
353353

354+
if ! dirac-admin-add-user -N pilot -D /C=ch/O=DIRAC/OU=DIRAC\ CI/CN=pilot -M [email protected] -G dirac_user -o /DIRAC/Security/UseServerCertificate=True "${DEBUG}"; then
355+
echo 'ERROR: dirac-admin-add-user failed' >&2
356+
exit 1
357+
fi
358+
354359
if ! dirac-admin-add-user -N trialUser -D /C=ch/O=DIRAC/OU=DIRAC\ CI/CN=trialUser -M [email protected] -G dirac_user -o /DIRAC/Security/UseServerCertificate=True "${DEBUG}"; then
355360
echo 'ERROR: dirac-admin-add-user failed' >&2
356361
exit 1
@@ -361,6 +366,11 @@ diracUserAndGroup() {
361366
exit 1
362367
fi
363368

369+
if ! dirac-admin-add-group -G pilot -U pilot -P GenericPilot,LimitedDelegation VO=vo -o /DIRAC/Security/UseServerCertificate=True "${DEBUG}"; then
370+
echo 'ERROR: dirac-admin-add-group failed' >&2
371+
exit 1
372+
fi
373+
364374
if ! dirac-admin-add-group -G jenkins_fcadmin -U adminusername,ciuser,trialUser -P FileCatalogManagement,NormalUser -o /DIRAC/Security/UseServerCertificate=True VO=vo "${DEBUG}"; then
365375
echo 'ERROR: dirac-admin-add-group failed' >&2
366376
exit 1

0 commit comments

Comments
 (0)