Skip to content

Commit 8e2be7a

Browse files
committed
test: use v9 instead of v8 for legacy
1 parent 921f36d commit 8e2be7a

4 files changed

Lines changed: 150 additions & 178 deletions

File tree

.github/workflows/integration.yml

Lines changed: 63 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ on:
44
push:
55
paths-ignore:
66
# Docs
7-
- 'docs/**'
8-
- 'README.rst'
7+
- "docs/**"
8+
- "README.rst"
99
# When push new release
10-
- 'release.notes'
11-
- 'src/DIRAC/__init__.py' # It is expected that only the version number will change here
12-
- 'releases.cfg'
10+
- "release.notes"
11+
- "src/DIRAC/__init__.py" # It is expected that only the version number will change here
12+
- "releases.cfg"
1313
pull_request:
1414
paths-ignore:
1515
# RPs with docs
16-
- 'docs/**'
17-
- 'README.rst'
18-
- 'release.notes'
16+
- "docs/**"
17+
- "README.rst"
18+
- "release.notes"
1919

2020
jobs:
2121
Integration:
@@ -36,63 +36,63 @@ jobs:
3636
- TEST_NAME: "Force DEncode and MySQL8"
3737
ARGS: DIRAC_USE_JSON_ENCODE=NO MYSQL_VER=mysql:8.0.40
3838
- TEST_NAME: "Backward Compatibility"
39-
ARGS: CLIENT_INSTALLATION_BRANCH=rel-v8r0 PILOT_INSTALLATION_BRANCH=rel-v8r0
39+
ARGS: CLIENT_INSTALLATION_BRANCH=rel-v9r0 PILOT_INSTALLATION_BRANCH=rel-v9r0
4040
- TEST_NAME: "Test DiracX latest"
4141
ARGS: TEST_DIRACX=Yes
4242

4343
steps:
44-
- uses: actions/checkout@v4
45-
- name: Fail-fast for outdated pipelines
46-
run: .github/workflows/fail-fast.sh
47-
- run: |
48-
git fetch --prune --unshallow
49-
- uses: actions/setup-python@v5
50-
with:
51-
python-version: '3.11'
52-
- uses: cvmfs-contrib/github-action-cvmfs@v5
53-
- name: Installing dependencies
54-
run: |
55-
python -m pip install \
56-
gitpython \
57-
packaging \
58-
pyyaml \
59-
requests \
60-
typer
61-
- name: Prepare environment
62-
run: ./integration_tests.py prepare-environment ${{ matrix.ARGS }}
63-
- name: Install server
64-
run: ./integration_tests.py install-server
65-
- name: Install client
66-
run: ./integration_tests.py install-client
67-
- name: Install pilot
68-
run: ./integration_tests.py install-pilot
69-
- name: Server tests
70-
run: ./integration_tests.py test-server || touch server-tests-failed
71-
- name: Client tests
72-
run: ./integration_tests.py test-client || touch client-tests-failed
73-
- name: Pilot tests
74-
run: ./integration_tests.py test-pilot || touch pilot-tests-failed
75-
- name: Opensearch logs
76-
run: docker logs opensearch
77-
- name: Check test status
78-
run: |
79-
has_error=0
80-
if [ -f server-tests-failed ]; then has_error=1; echo "Server tests failed"; fi
81-
if [ -f client-tests-failed ]; then has_error=1; echo "Client tests failed"; fi
82-
if [ -f pilot-tests-failed ]; then has_error=1; echo "pilot tests failed"; fi
83-
if [ ${has_error} = 1 ]; then exit 1; fi
84-
- name: diracx filtered requests logs
85-
if: contains(matrix.ARGS, 'TEST_DIRACX=Yes')
86-
run: |
87-
docker logs diracx 2>/dev/null | grep '/api/' \
88-
| awk -F\" '{print $2, $3}' \
89-
| awk '{print $1, $2, $4}' \
90-
| sort | uniq -c | sort
44+
- uses: actions/checkout@v4
45+
- name: Fail-fast for outdated pipelines
46+
run: .github/workflows/fail-fast.sh
47+
- run: |
48+
git fetch --prune --unshallow
49+
- uses: actions/setup-python@v5
50+
with:
51+
python-version: "3.11"
52+
- uses: cvmfs-contrib/github-action-cvmfs@v5
53+
- name: Installing dependencies
54+
run: |
55+
python -m pip install \
56+
gitpython \
57+
packaging \
58+
pyyaml \
59+
requests \
60+
typer
61+
- name: Prepare environment
62+
run: ./integration_tests.py prepare-environment ${{ matrix.ARGS }}
63+
- name: Install server
64+
run: ./integration_tests.py install-server
65+
- name: Install client
66+
run: ./integration_tests.py install-client
67+
- name: Install pilot
68+
run: ./integration_tests.py install-pilot
69+
- name: Server tests
70+
run: ./integration_tests.py test-server || touch server-tests-failed
71+
- name: Client tests
72+
run: ./integration_tests.py test-client || touch client-tests-failed
73+
- name: Pilot tests
74+
run: ./integration_tests.py test-pilot || touch pilot-tests-failed
75+
- name: Opensearch logs
76+
run: docker logs opensearch
77+
- name: Check test status
78+
run: |
79+
has_error=0
80+
if [ -f server-tests-failed ]; then has_error=1; echo "Server tests failed"; fi
81+
if [ -f client-tests-failed ]; then has_error=1; echo "Client tests failed"; fi
82+
if [ -f pilot-tests-failed ]; then has_error=1; echo "pilot tests failed"; fi
83+
if [ ${has_error} = 1 ]; then exit 1; fi
84+
- name: diracx filtered requests logs
85+
if: contains(matrix.ARGS, 'TEST_DIRACX=Yes')
86+
run: |
87+
docker logs diracx 2>/dev/null | grep '/api/' \
88+
| awk -F\" '{print $2, $3}' \
89+
| awk '{print $1, $2, $4}' \
90+
| sort | uniq -c | sort
9191
92-
- name: diracx error logs
93-
if: ${{ failure() && contains(matrix.ARGS, 'TEST_DIRACX=Yes') }}
94-
run: |
95-
mkdir -p /tmp/service-logs
96-
docker logs diracx 2>&1 | tee /tmp/service-logs/diracx.log
97-
cd /tmp/DIRACRepo
98-
./integration_tests.py logs --no-follow --lines 1000 2>&1 | tee /tmp/service-logs/dirac.log
92+
- name: diracx error logs
93+
if: ${{ failure() && contains(matrix.ARGS, 'TEST_DIRACX=Yes') }}
94+
run: |
95+
mkdir -p /tmp/service-logs
96+
docker logs diracx 2>&1 | tee /tmp/service-logs/diracx.log
97+
cd /tmp/DIRACRepo
98+
./integration_tests.py logs --no-follow --lines 1000 2>&1 | tee /tmp/service-logs/dirac.log

integration_tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def list_commands(self, ctx):
128128
MYSQL_VER: {DEFAULT_MYSQL_VER!r}
129129
ES_VER: {DEFAULT_ES_VER!r}
130130
IAM_VER: {DEFAULT_IAM_VER!r}
131-
{(os.linesep + ' ').join(['%s: %r' % x for x in FEATURE_VARIABLES.items()])}
131+
{(os.linesep + " ").join(["%s: %r" % x for x in FEATURE_VARIABLES.items()])}
132132
133133
All features can be prefixed with "SERVER_" or "CLIENT_" to limit their scope.
134134
@@ -738,7 +738,7 @@ def _check_containers_running(*, is_up=True):
738738

739739
def _find_dirac_release():
740740
# Start by looking for the GitHub/GitLab environment variables
741-
if "GITHUB_BASE_REF" in os.environ: # this will be "rel-v8r0"
741+
if "GITHUB_BASE_REF" in os.environ: # this will be "rel-v9r0"
742742
return os.environ["GITHUB_BASE_REF"]
743743
if "CI_COMMIT_REF_NAME" in os.environ:
744744
return os.environ["CI_COMMIT_REF_NAME"]

tests/CI/install_client.sh

Lines changed: 41 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,25 @@ mkdir -p "$PWD/TestCode"
2727
cd "$PWD/TestCode"
2828

2929
if [[ -n "${INSTALLATION_BRANCH}" ]]; then
30-
# Use this for (e.g.) running backward-compatibility tests
31-
echo "Using https://github.com/DIRACGrid/DIRAC.git@${INSTALLATION_BRANCH} for the tests"
32-
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}/.globus/usercert.pem" client.pem
36-
ln -s "${HOME}/.globus/userkey.pem" client.key
30+
# Use this for (e.g.) running backward-compatibility tests
31+
echo "Using https://github.com/DIRACGrid/DIRAC.git@${INSTALLATION_BRANCH} for the tests"
32+
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}/.globus/usercert.pem" client.pem
36+
ln -s "${HOME}/.globus/userkey.pem" client.key
3737
else
38-
for repo_path in "${TESTREPO[@]}"; do
39-
if [[ -d "${repo_path}" ]]; then
40-
cp -r "${repo_path}" "$(basename "${repo_path}")"
41-
cd "$(basename "${repo_path}")"
42-
echo "Using local test repository in branch $(git branch | grep "\*" | sed -e "s/* //")"
43-
cd -
44-
else
45-
git clone --single-branch --branch "$TESTBRANCH" "https://github.com/$repo_path/DIRAC.git"
46-
echo "Using remote test repository ${repo_path} in branch ${TESTBRANCH}"
47-
fi
48-
done
38+
for repo_path in "${TESTREPO[@]}"; do
39+
if [[ -d "${repo_path}" ]]; then
40+
cp -r "${repo_path}" "$(basename "${repo_path}")"
41+
cd "$(basename "${repo_path}")"
42+
echo "Using local test repository in branch $(git branch | grep "\*" | sed -e "s/* //")"
43+
cd -
44+
else
45+
git clone --single-branch --branch "$TESTBRANCH" "https://github.com/$repo_path/DIRAC.git"
46+
echo "Using remote test repository ${repo_path} in branch ${TESTBRANCH}"
47+
fi
48+
done
4949
fi
5050

5151
cd ..
@@ -54,44 +54,39 @@ echo -e "*** $(date -u) **** Got the DIRAC tests ****\n"
5454

5555
source "${DIRAC_CI_SETUP_SCRIPT}"
5656

57-
if [[ -n "${INSTALLATION_BRANCH}" ]]; then
58-
# shellcheck disable=SC2034
59-
DIRACSETUP=$(< "${INSTALL_CFG_FILE}" grep "Setup = " | cut -f5 -d " ")
60-
fi
61-
6257
echo -e "*** $(date -u) **** Client INSTALLATION START ****\n"
6358

6459
installDIRAC
6560

6661
if [[ -z "${INSTALLATION_BRANCH}" ]]; then
67-
echo 'Generate a pilot proxy, to be used by the pilot'
68-
dirac-proxy-init -g pilot -C /ca/certs/pilot.pem -K /ca/certs/pilot.key "${DEBUG}"
69-
mv /tmp/x509up_u$UID /ca/certs/pilot_proxy
62+
echo 'Generate a pilot proxy, to be used by the pilot'
63+
dirac-proxy-init -g pilot -C /ca/certs/pilot.pem -K /ca/certs/pilot.key "${DEBUG}"
64+
mv /tmp/x509up_u$UID /ca/certs/pilot_proxy
7065

71-
echo -e "*** $(date -u) Getting a non privileged user\n" |& tee -a clientTestOutputs.txt
72-
dirac-proxy-init "${DEBUG}" |& tee -a clientTestOutputs.txt
66+
echo -e "*** $(date -u) Getting a non privileged user\n" |& tee -a clientTestOutputs.txt
67+
dirac-proxy-init "${DEBUG}" |& tee -a clientTestOutputs.txt
7368

74-
#-------------------------------------------------------------------------------#
75-
echo -e "*** $(date -u) **** Submit a job ****\n"
69+
#-------------------------------------------------------------------------------#
70+
echo -e "*** $(date -u) **** Submit a job ****\n"
7671

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

82-
#-------------------------------------------------------------------------------#
83-
echo -e "*** $(date -u) **** add a file ****\n"
77+
#-------------------------------------------------------------------------------#
78+
echo -e "*** $(date -u) **** add a file ****\n"
8479

85-
echo "${CLIENT_UPLOAD_BASE64}" > b64_lfn
86-
base64 b64_lfn --decode > "${CLIENT_UPLOAD_FILE}"
87-
dirac-dms-add-file "${CLIENT_UPLOAD_LFN}" "${CLIENT_UPLOAD_FILE}" S3-DIRECT
88-
echo $?
80+
echo "${CLIENT_UPLOAD_BASE64}" >b64_lfn
81+
base64 b64_lfn --decode >"${CLIENT_UPLOAD_FILE}"
82+
dirac-dms-add-file "${CLIENT_UPLOAD_LFN}" "${CLIENT_UPLOAD_FILE}" S3-DIRECT
83+
echo $?
8984

90-
#-------------------------------------------------------------------------------#
91-
echo -e "*** $(date -u) **** Submit a job with an input ****\n"
85+
#-------------------------------------------------------------------------------#
86+
echo -e "*** $(date -u) **** Submit a job with an input ****\n"
9287

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

0 commit comments

Comments
 (0)