Skip to content

Commit 8072a32

Browse files
committed
fix: run server tests without a proxy
1 parent 2fd668d commit 8072a32

File tree

4 files changed

+11
-33
lines changed

4 files changed

+11
-33
lines changed

tests/Integration/all_integration_client_tests.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ 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+
2328
#-------------------------------------------------------------------------------#
2429
echo -e "*** $(date -u) **** RMS TESTS ****\n"
2530

tests/Integration/all_integration_server_tests.sh

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ 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}"
78-
python "${THIS_DIR}/DataManagementSystem/Test_Client_DFC.py" |& tee -a "${SERVER_TEST_OUTPUT}"; (( ERR |= "${?}" ))
77+
# dirac-login -C "${WORKSPACE}/ServerInstallDIR/user/client.pem" -K "${WORKSPACE}/ServerInstallDIR/user/client.key" "${DEBUG}"
78+
# 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 |= "${?}" ))
8181

@@ -86,21 +86,16 @@ echo -e "*** $(date -u) Restart the DFC service (required for Test_Client_DFC)\
8686
if [[ "${TEST_HTTPS:-Yes}" = "No" ]]; then
8787
dirac-restart-component DataManagement FileCatalog "${DEBUG}" |& tee -a "${SERVER_TEST_OUTPUT}"
8888
fi
89-
dirac-restart-component Tornado Tornado "${DEBUG}" |& tee -a "${SERVER_TEST_OUTPUT}"
89+
# dirac-restart-component Tornado Tornado "${DEBUG}" |& tee -a "${SERVER_TEST_OUTPUT}"
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}"
94-
python "${THIS_DIR}/DataManagementSystem/Test_Client_DFC.py" |& tee -a "${SERVER_TEST_OUTPUT}"; (( ERR |= "${?}" ))
93+
# dirac-login prod -C "${WORKSPACE}/ServerInstallDIR/user/client.pem" -K "${WORKSPACE}/ServerInstallDIR/user/client.key" "${DEBUG}" |& tee -a "${SERVER_TEST_OUTPUT}"
94+
# 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 |= "${?}" ))
9797

9898

99-
#-------------------------------------------------------------------------------#
100-
echo -e "*** $(date -u) **** FTS TESTS ****\n"
101-
# I know, it says Client, but it also instantiates a DB, so it needs to be here
102-
pytest --no-check-dirac-environment "${THIS_DIR}/DataManagementSystem/Test_Client_FTS3.py" |& tee -a "${SERVER_TEST_OUTPUT}"; (( ERR |= "${?}" ))
103-
10499
#-------------------------------------------------------------------------------#
105100
echo -e "*** $(date -u) **** RMS TESTS ****\n"
106101
pytest --no-check-dirac-environment "${THIS_DIR}/RequestManagementSystem/Test_ReqDB.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
@@ -126,7 +126,6 @@ installSite() {
126126
echo "source \"$PWD/diracos/diracosrc\"" > "$PWD/bashrc"
127127

128128
mkdir -p "${SERVERINSTALLDIR}/diracos/etc/grid-security/certificates/"
129-
mkdir -p "${SERVERINSTALLDIR}/user/"
130129

131130
echo "==> CAs and certificates"
132131

@@ -144,10 +143,6 @@ installSite() {
144143
# will be wrong on the client
145144
ln -s "${SERVERINSTALLDIR}/diracos/etc/grid-security/certificates/ca.cert.pem" "${SERVERINSTALLDIR}/diracos/etc/grid-security/certificates/$caHash.0"
146145

147-
# # Copy the user cert and key to the correct directory
148-
# cp /ca/certs/client.pem "${SERVERINSTALLDIR}/user/"
149-
# cp /ca/certs/client.key "${SERVERINSTALLDIR}/user/"
150-
151146
rm -rf "${SERVERINSTALLDIR}/etc"
152147
ln -s "${SERVERINSTALLDIR}/diracos/etc" "${SERVERINSTALLDIR}/etc"
153148
source diracos/diracosrc
@@ -231,11 +226,6 @@ fullInstallDIRAC() {
231226
cat "${SERVERINSTALLDIR}/diracos/etc/Production.cfg"
232227
fi
233228

234-
# if ! diracCredentials; then
235-
# echo "ERROR: diracCredentials failed" >&2
236-
# exit 1
237-
# fi
238-
239229
#just add a site
240230
if ! diracAddSite; then
241231
echo "ERROR: diracAddSite failed" >&2

tests/Jenkins/utilities.sh

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,6 @@ installDIRAC() {
248248
echo "export X509_CERT_DIR=\"$PWD/diracos/etc/grid-security/certificates\"" >> "$PWD/bashrc"
249249
source diracos/diracosrc
250250

251-
# Copy the user cert and key to the correct directory
252-
# cp /ca/certs/client.pem "${SERVERINSTALLDIR}/user/"
253-
# cp /ca/certs/client.key "${SERVERINSTALLDIR}/user/"
254251
cp /ca/certs/client.pem /home/dirac/.globus/usercert.pem
255252
cp /ca/certs/client.key /home/dirac/.globus/userkey.pem
256253

@@ -395,8 +392,7 @@ diracCredentials() {
395392
echo '==> [diracCredentials]'
396393

397394
sed -i 's/commitNewData = CSAdministrator/commitNewData = authenticated/g' "${SERVERINSTALLDIR}/etc/Configuration_Server.cfg"
398-
if ! dirac-proxy-init dirac_admin --nocs -C "${SERVERINSTALLDIR}/user/client.pem" -K "${SERVERINSTALLDIR}/user/client.key" "${DEBUG}" --valid 72:00; then
399-
# if ! dirac-login dirac_admin --nocs -C "${SERVERINSTALLDIR}/user/client.pem" -K "${SERVERINSTALLDIR}/user/client.key" "${DEBUG}" -T 72; then
395+
if ! dirac-proxy-init dirac_admin --nocs "${DEBUG}" --valid 72:00; then
400396
echo 'ERROR: dirac-proxy-init failed' >&2
401397
exit 1
402398
fi
@@ -541,10 +537,6 @@ diracServices(){
541537

542538
local services=$(cut -d '.' -f 1 < services | grep -v StorageElementHandler | grep -v ^ConfigurationSystem | grep -v RAWIntegrity | grep -v RunDBInterface | grep -v ComponentMonitoring | sed 's/System / /g' | sed 's/Handler//g' | sed 's/ /\//g')
543539

544-
# group proxy, will be uploaded explicitly
545-
# echo '==> getting/uploading proxy for prod'
546-
# dirac-proxy-init -U -g prod -C ${SERVERINSTALLDIR}/user/client.pem -K ${SERVERINSTALLDIR}/user/client.key "${DEBUG}"
547-
548540
for serv in $services; do
549541
echo "==> calling dirac-install-component $serv -o /DIRAC/Security/UseServerCertificate=True ${DEBUG}"
550542
if ! dirac-install-component "$serv" -o /DIRAC/Security/UseServerCertificate=True "${DEBUG}"; then
@@ -596,10 +588,6 @@ diracUninstallServices(){
596588
# Ignore tornado services
597589
local services=$(cut -d '.' -f 1 < services | grep -v TokenManager | grep -v ^ConfigurationSystem | grep -v RAWIntegrity | grep -v RunDBInterface | grep -v ComponentMonitoring | grep -v Tornado | sed 's/System / /g' | sed 's/Handler//g' | sed 's/ /\//g')
598590

599-
# group proxy, will be uploaded explicitly
600-
# echo '==> getting/uploading proxy for prod'
601-
# dirac-proxy-init -U -g prod -C ${SERVERINSTALLDIR}/user/client.pem -K ${SERVERINSTALLDIR}/user/client.key "${DEBUG}"
602-
603591
# check if errexit mode is set and disabling as the component may not exist
604592
local save=$-
605593
if [[ $save =~ e ]]; then

0 commit comments

Comments
 (0)