Skip to content

Commit 61a98c7

Browse files
committed
fix: do not submit from jobs from v8
1 parent e7823c6 commit 61a98c7

File tree

4 files changed

+34
-39
lines changed

4 files changed

+34
-39
lines changed

tests/CI/docker-compose.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ volumes:
55
diracx-cs-store:
66
# Volume used to store the pair of keys to sign the tokens
77
diracx-key-store:
8-
# Volume used to store the certificates of dirac
9-
certs_data:
108
# Volume used to store the jwks of the IAM service
119
diracx-iam-key-store:
1210

@@ -113,15 +111,6 @@ services:
113111
/entrypoint.sh
114112
pull_policy: always
115113

116-
dirac-init-certificates:
117-
image: ghcr.io/diracgrid/management/certificates-generation:latest
118-
container_name: dirac-init-certificates
119-
volumes:
120-
- certs_data:/ca/certs/
121-
entrypoint: |
122-
/entrypoint.sh
123-
pull_policy: always
124-
125114
dirac-server:
126115
image: ${CI_REGISTRY_IMAGE}/${HOST_OS}-dirac
127116
container_name: server
@@ -149,7 +138,6 @@ services:
149138
- certs_data:/ca/certs
150139
- diracx-cs-store:/cs_store
151140
- diracx-key-store:/signing-key
152-
- certs_data:/ca/certs
153141
environment:
154142
- DIRACX_CONFIG_BACKEND_URL=git+file:///cs_store/initialRepo
155143
- DIRACX_SERVICE_AUTH_TOKEN_KEY=file:///signing-key/rs256.key
@@ -168,8 +156,6 @@ services:
168156
- certs_data:/ca/certs
169157
ulimits:
170158
nofile: 8192
171-
volumes:
172-
- certs_data:/ca/certs
173159
command: ["sleep", "infinity"] # This is necessary because of the issue described in https://github.com/moby/moby/issues/42275. What is added here is a hack/workaround.
174160
pull_policy: always
175161

tests/CI/install_client.sh

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ if [[ -n "${INSTALLATION_BRANCH}" ]]; then
3030
# Use this for (e.g.) running backward-compatibility tests
3131
echo "Using https://github.com/DIRACGrid/DIRAC.git@${INSTALLATION_BRANCH} for the tests"
3232
git clone --single-branch --branch "$INSTALLATION_BRANCH" "https://github.com/DIRACGrid/DIRAC.git"
33+
mkdir -p /home/dirac/ServerInstallDIR/user
34+
cd /home/dirac/ServerInstallDIR/user
35+
ln -s /home/dirac/.globus/usercert.pem client.pem
36+
ln -s /home/dirac/.globus/userkey.pem client.key
3337
else
3438
for repo_path in "${TESTREPO[@]}"; do
3539
if [[ -d "${repo_path}" ]]; then
@@ -59,29 +63,31 @@ echo -e "*** $(date -u) **** Client INSTALLATION START ****\n"
5963

6064
installDIRAC
6165

62-
echo -e "*** $(date -u) Getting a non privileged user\n" |& tee -a clientTestOutputs.txt
63-
dirac-proxy-init "${DEBUG}" |& tee -a clientTestOutputs.txt
66+
if [[ -z "${INSTALLATION_BRANCH}" ]]; then
67+
echo -e "*** $(date -u) Getting a non privileged user\n" |& tee -a clientTestOutputs.txt
68+
dirac-proxy-init "${DEBUG}" |& tee -a clientTestOutputs.txt
6469

65-
#-------------------------------------------------------------------------------#
66-
echo -e "*** $(date -u) **** Submit a job ****\n"
70+
#-------------------------------------------------------------------------------#
71+
echo -e "*** $(date -u) **** Submit a job ****\n"
6772

68-
echo -e '[\n Arguments = "Hello World";\n Executable = "echo";\n Site = "DIRAC.Jenkins.ch";' > test.jdl
69-
echo " JobName = \"${GITHUB_JOB}_$(date +"%Y-%m-%d_%T" | sed 's/://g')\"" >> test.jdl
70-
echo "]" >> test.jdl
71-
dirac-wms-job-submit test.jdl "${DEBUG}" |& tee -a clientTestOutputs.txt
73+
echo -e '[\n Arguments = "Hello World";\n Executable = "echo";\n Site = "DIRAC.Jenkins.ch";' > test.jdl
74+
echo " JobName = \"${GITHUB_JOB}_$(date +"%Y-%m-%d_%T" | sed 's/://g')\"" >> test.jdl
75+
echo "]" >> test.jdl
76+
dirac-wms-job-submit test.jdl "${DEBUG}" |& tee -a clientTestOutputs.txt
7277

73-
#-------------------------------------------------------------------------------#
74-
echo -e "*** $(date -u) **** add a file ****\n"
78+
#-------------------------------------------------------------------------------#
79+
echo -e "*** $(date -u) **** add a file ****\n"
7580

76-
echo "${CLIENT_UPLOAD_BASE64}" > b64_lfn
77-
base64 b64_lfn --decode > "${CLIENT_UPLOAD_FILE}"
78-
dirac-dms-add-file "${CLIENT_UPLOAD_LFN}" "${CLIENT_UPLOAD_FILE}" S3-DIRECT
79-
echo $?
81+
echo "${CLIENT_UPLOAD_BASE64}" > b64_lfn
82+
base64 b64_lfn --decode > "${CLIENT_UPLOAD_FILE}"
83+
dirac-dms-add-file "${CLIENT_UPLOAD_LFN}" "${CLIENT_UPLOAD_FILE}" S3-DIRECT
84+
echo $?
8085

81-
#-------------------------------------------------------------------------------#
82-
echo -e "*** $(date -u) **** Submit a job with an input ****\n"
86+
#-------------------------------------------------------------------------------#
87+
echo -e "*** $(date -u) **** Submit a job with an input ****\n"
8388

84-
echo -e '[\n Arguments = "Hello World";\n Executable = "echo";\n Site = "DIRAC.Jenkins.ch";\n InputData = "/vo/test_lfn.txt";' > test_dl.jdl
85-
echo " JobName = \"${GITHUB_JOB}_$(date +"%Y-%m-%d_%T" | sed 's/://g')\"" >> test_dl.jdl
86-
echo "]" >> test_dl.jdl
87-
dirac-wms-job-submit test_dl.jdl "${DEBUG}" |& tee -a clientTestOutputs.txt
89+
echo -e '[\n Arguments = "Hello World";\n Executable = "echo";\n Site = "DIRAC.Jenkins.ch";\n InputData = "/vo/test_lfn.txt";' > test_dl.jdl
90+
echo " JobName = \"${GITHUB_JOB}_$(date +"%Y-%m-%d_%T" | sed 's/://g')\"" >> test_dl.jdl
91+
echo "]" >> test_dl.jdl
92+
dirac-wms-job-submit test_dl.jdl "${DEBUG}" |& tee -a clientTestOutputs.txt
93+
fi

tests/CI/run_tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ elif [[ "$INSTALLTYPE" == "client" ]]; then
5252

5353
elif [[ "$INSTALLTYPE" == "pilot" ]]; then
5454
# shellcheck source=/dev/null
55-
source "$WORKSPACE/PilotInstallDIR/bashrc"
55+
source "$WORKSPACE/bashrc"
5656
# If not unset, assert will not trigger
5757
unset PYTHONOPTIMIZE
5858
set -o pipefail

tests/Integration/all_integration_client_tests.sh

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

14+
if [[ -n "${INSTALLATION_BRANCH}" ]]; then
15+
echo -r "*** re-configure ***"
16+
dirac-proxy-init --nocs --no-upload
17+
dirac-configure -S dirac-JenkinsSetup -C https://server:9135/Configuration/Server --SkipCAChecks
18+
fi
19+
1420
echo -e "*** $(date -u) Getting a non privileged user\n" |& tee -a clientTestOutputs.txt
1521
dirac-proxy-init "${DEBUG}" |& tee -a clientTestOutputs.txt; (( ERR |= "${?}" ))
1622

@@ -23,13 +29,10 @@ pytest --no-check-dirac-environment "${THIS_DIR}/AccountingSystem/Test_ReportsCl
2329
#-------------------------------------------------------------------------------#
2430
echo -e "*** $(date -u) **** RMS TESTS ****\n"
2531

26-
echo -e "*** $(date -u) Getting a non privileged user\n" |& tee -a clientTestOutputs.txt
27-
dirac-proxy-init "${DEBUG}" |& tee -a clientTestOutputs.txt
28-
2932
echo -e "*** $(date -u) Starting RMS Client test as a non privileged user\n" |& tee -a clientTestOutputs.txt
3033
pytest --no-check-dirac-environment "${THIS_DIR}/RequestManagementSystem/Test_Client_Req.py" |& tee -a clientTestOutputs.txt; (( ERR |= "${?}" ))
3134

32-
echo -e "*** $(date -u) getting the prod role again\n" |& tee -a clientTestOutputs.txt
35+
echo -e "*** $(date -u) getting a privileged user\n" |& tee -a clientTestOutputs.txt
3336
dirac-proxy-init -g prod "${DEBUG}" |& tee -a clientTestOutputs.txt
3437
echo -e "*** $(date -u) Starting RMS Client test as an admin user\n" |& tee -a clientTestOutputs.txt
3538
pytest --no-check-dirac-environment "${THIS_DIR}/RequestManagementSystem/Test_Client_Req.py" |& tee -a clientTestOutputs.txt; (( ERR |= "${?}" ))

0 commit comments

Comments
 (0)