From c18e33b461f67abe273685889287a61d893a408d Mon Sep 17 00:00:00 2001 From: Federico Stagni Date: Mon, 4 Nov 2024 17:18:34 +0100 Subject: [PATCH] test: removed CESNET from config --- src/DIRAC/tests/Utilities/testJobDefinitions.py | 13 ++++++++++--- .../System/exe-script-with-input-single-location.py | 11 +---------- tests/System/exe-script-with-input.py | 11 +---------- tests/System/transformationSystem.sh | 2 +- tests/System/transformation_replication.sh | 2 +- tests/System/unitTestUserJobs.py | 5 ++++- 6 files changed, 18 insertions(+), 26 deletions(-) diff --git a/src/DIRAC/tests/Utilities/testJobDefinitions.py b/src/DIRAC/tests/Utilities/testJobDefinitions.py index ce3e07dea55..a4df06c23a6 100644 --- a/src/DIRAC/tests/Utilities/testJobDefinitions.py +++ b/src/DIRAC/tests/Utilities/testJobDefinitions.py @@ -74,7 +74,9 @@ def helloWorld_input(): try: J.setInputSandbox([find_all("exe-script-with-input.py", ".", "DIRAC/tests/Workflow")[0]]) except IndexError: # we are in Jenkins - J.setInputSandbox([find_all("exe-script-with-input.py", os.environ["WORKSPACE"], "DIRAC/tests/Workflow")[0]]) + J.setInputSandbox( + [find_all("exe-script-with-input.py", os.environ["WORKSPACE"], "DIRAC/tests/Workflow")[0]] + ) J.setExecutable("exe-script-with-input.py", "", "helloWorld.log") return endOfAllJobs(J) @@ -89,7 +91,13 @@ def helloWorld_input_single(): try: J.setInputSandbox([find_all("exe-script-with-input-single-location.py", ".", "DIRAC/tests/Workflow")[0]]) except IndexError: # we are in Jenkins - J.setInputSandbox([find_all("exe-script-with-input-single-location.py", os.environ["WORKSPACE"], "DIRAC/tests/Workflow")[0]]) + J.setInputSandbox( + [ + find_all( + "exe-script-with-input-single-location.py", os.environ["WORKSPACE"], "DIRAC/tests/Workflow" + )[0] + ] + ) J.setExecutable("exe-script-with-input-single-location.py", "", "helloWorld.log") return endOfAllJobs(J) @@ -313,7 +321,6 @@ def parametricJobInputData(): return endOfAllJobs(J) - def jobWithOutput(): """Creates a job that uploads an output. The output SE is not set here, so it would use the default /Resources/StorageElementGroups/SE-USER diff --git a/tests/System/exe-script-with-input-single-location.py b/tests/System/exe-script-with-input-single-location.py index 920264cb0bf..dd3d250f3be 100644 --- a/tests/System/exe-script-with-input-single-location.py +++ b/tests/System/exe-script-with-input-single-location.py @@ -1,14 +1,5 @@ #!/usr/bin/env python -############################################################################### -# (c) Copyright 2019 CERN for the benefit of the LHCb Collaboration # -# # -# This software is distributed under the terms of the GNU General Public # -# Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE". # -# # -# In applying this licence, CERN does not waive the privileges and immunities # -# granted to it by virtue of its status as an Intergovernmental Organization # -# or submit itself to any jurisdiction. # -############################################################################### + """Script to run Executable application""" from os import system import sys diff --git a/tests/System/exe-script-with-input.py b/tests/System/exe-script-with-input.py index 141d26c7e97..2c779e74b29 100644 --- a/tests/System/exe-script-with-input.py +++ b/tests/System/exe-script-with-input.py @@ -1,14 +1,5 @@ #!/usr/bin/env python -############################################################################### -# (c) Copyright 2019 CERN for the benefit of the LHCb Collaboration # -# # -# This software is distributed under the terms of the GNU General Public # -# Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE". # -# # -# In applying this licence, CERN does not waive the privileges and immunities # -# granted to it by virtue of its status as an Intergovernmental Organization # -# or submit itself to any jurisdiction. # -############################################################################### + """Script to run Executable application""" import sys from os import system diff --git a/tests/System/transformationSystem.sh b/tests/System/transformationSystem.sh index c3419586404..50494236b23 100755 --- a/tests/System/transformationSystem.sh +++ b/tests/System/transformationSystem.sh @@ -45,7 +45,7 @@ directory=/dteam/diracCertification/Test/INIT/$version/$tdate/$stime #selecting a random USER Storage Element #SEs=$(dirac-dms-show-se-status |grep USER |grep -v 'Banned\|Degraded\|-2' | awk '{print $1}') #get all SEs ending with -SE that are Active -SEs=$(dirac-dms-show-se-status | grep -e "-SE \|-disk" | grep -v 'RAL\|CESNET-SE\|Banned\|Probing\|Error\|-new' | awk '{print $1}') +SEs=$(dirac-dms-show-se-status | grep -e "-SE \|-disk" | grep -v 'RAL\|Banned\|Probing\|Error\|-new' | awk '{print $1}') x=0 for n in $SEs diff --git a/tests/System/transformation_replication.sh b/tests/System/transformation_replication.sh index 44ed9b9ff0b..17edf3f7cfe 100755 --- a/tests/System/transformation_replication.sh +++ b/tests/System/transformation_replication.sh @@ -45,7 +45,7 @@ echo "Creating TransformationSystemTest" mkdir -p TransformationSystemTest directory=/dteam/diracCertification/Test/INIT/$version/$tdate/$stime/replication #get all SEs ending with -SE that are Active, randomize, turn into array -SEs=( $(dirac-dms-show-se-status | grep -e "-SE \|-disk " | grep -v 'RAL\|CESNET\|Banned\|Probing\|Error\|-new' | awk '{print $1}' | sort -R | xargs) ) +SEs=( $(dirac-dms-show-se-status | grep -e "-SE \|-disk " | grep -v 'RAL\|Banned\|Probing\|Error\|-new' | awk '{print $1}' | sort -R | xargs) ) SOURCE_SE=${SEs[0]} TARGET_SE=${SEs[1]} diff --git a/tests/System/unitTestUserJobs.py b/tests/System/unitTestUserJobs.py index 0fe7a32fa66..af0c78b1e73 100644 --- a/tests/System/unitTestUserJobs.py +++ b/tests/System/unitTestUserJobs.py @@ -29,7 +29,10 @@ def setUp(self): sys.exit(1) res = DataManager().getReplicas( - ["/dteam/user/f/fstagni/test/testInputFileSingleLocation.txt", "/dteam/user/f/fstagni/test/testInputFile.txt"] + [ + "/dteam/user/f/fstagni/test/testInputFileSingleLocation.txt", + "/dteam/user/f/fstagni/test/testInputFile.txt", + ] ) if not res["OK"]: print(f"DATAMANAGER.getRepicas failure: {res['Message']}")