From f6568f8376f179d2ac259a1495f5118c82744549 Mon Sep 17 00:00:00 2001 From: enricovianello Date: Tue, 30 Oct 2018 10:03:31 +0100 Subject: [PATCH 1/9] fixing all dav failures in progress --- tests/filetransfer/get.robot | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/filetransfer/get.robot b/tests/filetransfer/get.robot index 6558825..4e733a7 100644 --- a/tests/filetransfer/get.robot +++ b/tests/filetransfer/get.robot @@ -22,6 +22,9 @@ Do a releaseFile [Arguments] ${surl} ${token} ${output} Perform rf using clientSRM ${surl} ${token} Should contain ${output} SRM_SUCCESS +Get OR pattern [Arguments] ${first} ${second} + [Return] /(${first}|${second})/ + *** Test Cases *** File-Transfer get VO file with proxy @@ -52,5 +55,6 @@ File-Transfer get VO file as anonymous with anonymous http read disabled ${token} ${turl} Do a prepareToGet ${surl} http ${out} ${err} Do CURL GET ${turl} Should Not Contain ${out} 200 OK - Should Contain ${out} 403 - [Teardown] Clear all credentials \ No newline at end of file + ${pattern} Get OR pattern 403 401 Unauthorized + Should Match Regexp ${out} ${pattern} + [Teardown] Clear all credentials From 47910c75c7abfcba026b35afdf31c6bea88a40a1 Mon Sep 17 00:00:00 2001 From: enricovianello Date: Tue, 6 Nov 2018 15:44:39 +0100 Subject: [PATCH 2/9] Fixed some webdav and ft broken tests --- tests/filetransfer/get.robot | 6 +----- tests/filetransfer/put.robot | 2 +- tests/webdav/forbidden.robot | 20 ++++++++++---------- tests/webdav/get.robot | 2 +- 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/tests/filetransfer/get.robot b/tests/filetransfer/get.robot index 4e733a7..8854b6e 100644 --- a/tests/filetransfer/get.robot +++ b/tests/filetransfer/get.robot @@ -22,9 +22,6 @@ Do a releaseFile [Arguments] ${surl} ${token} ${output} Perform rf using clientSRM ${surl} ${token} Should contain ${output} SRM_SUCCESS -Get OR pattern [Arguments] ${first} ${second} - [Return] /(${first}|${second})/ - *** Test Cases *** File-Transfer get VO file with proxy @@ -55,6 +52,5 @@ File-Transfer get VO file as anonymous with anonymous http read disabled ${token} ${turl} Do a prepareToGet ${surl} http ${out} ${err} Do CURL GET ${turl} Should Not Contain ${out} 200 OK - ${pattern} Get OR pattern 403 401 Unauthorized - Should Match Regexp ${out} ${pattern} + Should Match Regexp ${out} (403|401 Unauthorized) [Teardown] Clear all credentials diff --git a/tests/filetransfer/put.robot b/tests/filetransfer/put.robot index 174cd26..5f64575 100644 --- a/tests/filetransfer/put.robot +++ b/tests/filetransfer/put.robot @@ -34,6 +34,6 @@ File-Transfer PUT VO file as anonymous ${token} ${turl} Do a prepareToPut ${surl} http ${out} ${err} Do CURL PUT ${turl} ${TEST_LOCAL_FILEPATH} Should Not Contain ${out} 200 OK - Should Contain ${out} 403 + Should Match Regexp ${out} (403|401 Unauthorized) Do a putDone ${surl} ${token} [Teardown] Clear all credentials diff --git a/tests/webdav/forbidden.robot b/tests/webdav/forbidden.robot index 974d9e5..e93021f 100644 --- a/tests/webdav/forbidden.robot +++ b/tests/webdav/forbidden.robot @@ -12,9 +12,9 @@ WebDAV GET/HEAD VO file as anonymous user and anonymous http read disabled Create working directory ${url} Build URL ${DAVEndpoint} ${TEST_SA} ${TEST_REMOTE_DIRNAME}/${TEST_FILENAME} ${stdout} ${stderr} Do CURL GET ${url} - Should Contain ${stdout} 403 + Should Match Regexp ${stdout} (403|401 Unauthorized) ${stdout} ${stderr} Do CURL HEAD ${url} - Should Contain ${stdout} 403 + Should Match Regexp ${stdout} (403|401 Unauthorized) [Teardown] Teardown default SA WebDAV GET/HEAD VO file as anonymous user and anonymous http read enabled @@ -44,9 +44,9 @@ WebDAV GET/HEAD VO file as anonymous user when anonymous http read is disabled Create working directory ${url} Build URL ${DAVEndpoint} ${TEST_SA} ${TEST_REMOTE_DIRNAME}/${TEST_FILENAME} ${stdout} ${stderr} Do CURL GET ${url} - Should Contain ${stdout} 403 + Should Match Regexp ${stdout} (403|401 Unauthorized) ${stdout} ${stderr} Do CURL HEAD ${url} - Should Contain ${stdout} 403 + Should Match Regexp ${stdout} (403|401 Unauthorized) [Teardown] Teardown default SA ######## PUT ######### @@ -57,7 +57,7 @@ WebDAV PUT VO file as anonymous Create empty working directory ${url} Build URL ${DAVEndpoint} ${TEST_SA} ${TEST_REMOTE_DIRNAME}/${TEST_FILENAME} ${stdout} ${stderr} Do CURL PUT ${url} ${TEST_LOCAL_FILEPATH} - Should Contain ${stdout} 403 + Should Match Regexp ${stdout} (403|401 Unauthorized) [Teardown] Teardown default SA WebDAV PUT VO file as authenticated but not authorized user @@ -88,7 +88,7 @@ WebDAV DELETE VO file as anonymous Create working directory ${url} Build URL ${DAVEndpoint} ${TEST_SA} ${TEST_REMOTE_DIRNAME}/${TEST_FILENAME} ${stdout} ${stderr} Do CURL DELETE ${url} - Should Contain ${stdout} 403 + Should Match Regexp ${stdout} (403|401 Unauthorized) [Teardown] Teardown default SA WebDAV DELETE VO file as authenticated but not authorized user @@ -119,7 +119,7 @@ WebDAV MKCOL VO directory as anonymous Create empty working directory ${url} Build URL ${DAVEndpoint} ${TEST_SA} ${TEST_REMOTE_DIRNAME}/${TEST_REMOTE_DIRNAME} ${stdout} ${stderr} Do CURL MKCOL ${url} - Should Contain ${stdout} 403 + Should Match Regexp ${stdout} (403|401 Unauthorized) [Teardown] Teardown default SA WebDAV MKCOL VO directory as authenticated but not authorized user @@ -151,7 +151,7 @@ WebDAV PROPFIND allprop VO file as anonymous ${body} Get PROPFIND ALLPROP body ${url} Build URL ${DAVEndpoint} ${TEST_SA} ${TEST_REMOTE_DIRNAME}/${TEST_FILENAME} ${stdout} ${stderr} Do CURL PROPFIND ${url} ${body} ${TEST_LOCAL_FILEPATH} - Should Contain ${stdout} 403 + Should Match Regexp ${stdout} (403|401 Unauthorized) [Teardown] Teardown default SA WebDAV PROPFIND allprop VO file as authenticated but not authorized user @@ -185,7 +185,7 @@ WebDAV COPY VO file as anonymous ${srcURL} Build URL ${DAVEndpoint} ${TEST_SA} ${TEST_REMOTE_DIRNAME}/${TEST_FILENAME} ${dstURL} Build URL ${DAVEndpoint} ${TEST_SA} ${TEST_REMOTE_DIRNAME}/${TEST_FILENAME}_2 ${stdout} ${stderr} Do CURL COPY ${srcURL} ${dstURL} - Should Contain ${stdout} 403 + Should Match Regexp ${stdout} (403|401 Unauthorized) [Teardown] Teardown default SA WebDAV COPY VO file to another VO SA with the wrong proxy @@ -217,7 +217,7 @@ WebDAV MOVE VO file as anonymous ${srcURL} Build URL ${DAVEndpoint} ${TEST_SA} ${TEST_REMOTE_DIRNAME}/${TEST_FILENAME} ${dstURL} Build URL ${DAVEndpoint} ${TEST_SA} ${TEST_REMOTE_DIRNAME}/${TEST_FILENAME}_2 ${stdout} ${stderr} Do CURL MOVE ${srcURL} ${dstURL} - Should Contain ${stdout} 403 + Should Match Regexp ${stdout} (403|401 Unauthorized) [Teardown] Teardown default SA WebDAV MOVE VO file to another VO SA with the wrong proxy diff --git a/tests/webdav/get.robot b/tests/webdav/get.robot index a07573c..102deab 100644 --- a/tests/webdav/get.robot +++ b/tests/webdav/get.robot @@ -82,7 +82,7 @@ WebDAV partial GET Should Contain ${stdout} Content-Range: bytes 11-12/13 Should Contain ${stdout} Content-Length: 2 ${stdout} ${stderr} Do CURL partial GET ${url} 20-24 ${TEST_CURL_OPTIONS} - Should Contain ${stdout} 416 Requested Range Not Satisfiable + Should Match Regexp ${stdout} (416 Requested Range Not Satisfiable|416 Range Not Satisfiable) ${stdout} ${stderr} Do CURL partial GET and check success ${url} 1-3,20-24 ${TEST_CURL_OPTIONS} Should Contain ${stdout} Content-Range: bytes 1-3/13 Should Contain ${stdout} est From ba9cfaa5e0504145a445583078d1ab0d6c7b8d73 Mon Sep 17 00:00:00 2001 From: enricovianello Date: Tue, 6 Nov 2018 16:48:30 +0100 Subject: [PATCH 3/9] Removed WebDAV symlink tests --- tests/webdav/symlink.robot | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 tests/webdav/symlink.robot diff --git a/tests/webdav/symlink.robot b/tests/webdav/symlink.robot deleted file mode 100644 index 382c4a5..0000000 --- a/tests/webdav/symlink.robot +++ /dev/null @@ -1,31 +0,0 @@ -*** Settings *** - -Resource lib/import.robot - -*** Test Cases *** - -WebDAV GET dotted path to another SA with unauthorized credentials - [Tags] webdav symlink no-gridhttps - [Setup] Setup default SA - ${url} Set Variable ${TEST_ENDPOINT}/${TEST_SA}/../${SA.2} - Log ${url} - ${stdout} ${stderr} Do CURL GET ${url} ${TEST_CURL_OPTIONS} - Should Not Contain ${stdout} 200 OK - Should Contain ${stdout} 403 - [Teardown] Teardown default SA - -WebDAV GET dotted path to another SA with authorized HTTP READ - [Tags] webdav symlink - [Setup] Setup default SA - ${url} Set Variable ${TEST_ENDPOINT}/${TEST_SA}/../${SA.7} - Log ${url} - Do CURL GET and check success ${url} ${TEST_CURL_OPTIONS} - [Teardown] Teardown default SA - -WebDAV GET dotted path to another SA with anonymous HTTP READ - [Tags] webdav symlink - [Setup] Setup default SA - ${url} Set Variable ${TEST_ENDPOINT}/${TEST_SA}/../${SA.9} - Log ${url} - Do CURL GET and check success ${url} ${TEST_CURL_OPTIONS} - [Teardown] Teardown default SA \ No newline at end of file From 03edefe1d10d4dcb6baee67d9886189546008296 Mon Sep 17 00:00:00 2001 From: enricovianello Date: Thu, 6 Dec 2018 10:47:05 +0100 Subject: [PATCH 4/9] Added Jenkinsfile with external pod configuration --- Jenkinsfile | 91 ++++++++++++++++++++++++++++++++++++++++++++++++ jenkins/pod.yaml | 45 ++++++++++++++++++++++++ 2 files changed, 136 insertions(+) create mode 100644 Jenkinsfile create mode 100644 jenkins/pod.yaml diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..2f3efae --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,91 @@ +pipeline { + agent { + kubernetes { + label "storm-testuite-runner-${env.BUILD_NUMBER}" + cloud 'Kube mwdevel' + defaultContainer 'jnlp' + yamlFile 'jenkins/pod.yaml' + } + } + + options { + timeout(time: 1, unit: 'HOURS') + buildDiscarder(logRotator(numToKeepStr: '5')) + } + + parameters { + choice(choices: 'develop\nmaster\nrelease/1.11.15', description: '', name: 'TESTSUITE_BRANCH') + string(defaultValue: "omii006-vm03.cnaf.infn.it", description: '', name: 'STORM_BE_HOST') + string(defaultValue: "omii003-vm01.cnaf.infn.it:8888", description: '', name: 'CDMI_ENDPOINT') + string(defaultValue: "to-be-fixed", description: '', name: 'TESTSUITE_EXCLUDE') + string(defaultValue: "tests", description: '', name: 'TESTSUITE_SUITE') + string(defaultValue: "/storage", description: '', name: 'STORM_STORAGE_ROOT_DIR') + } + + stages { + stage('run') { + steps { + container('kube-docker-runner') { + script { + withCredentials([ + usernamePassword(credentialsId: 'fa43a013-7c86-410f-8a8f-600b92706989', passwordVariable: 'CDMI_CLIENT_SECRET', usernameVariable: 'CDMI_CLIENT_ID'), + usernamePassword(credentialsId: 'a5ca708a-eca8-4fc0-83cd-eb3695f083a1', passwordVariable: 'IAM_USER_PASSWORD', usernameVariable: 'IAM_USER_NAME') + ]) { + + def image = "${env.DOCKER_REGISTRY_HOST}/italiangrid/storm-testsuite:latest" + echo "image: ${image}" + + sh "docker pull ${image}" + + def name = "${env.JOB_BASE_NAME}-${env.BUILD_NUMBER}".replaceAll("[^a-zA-Z0-9 ]+","") + echo "name: ${name}" + + def variables = [] + variables.add("-e TESTSUITE_BRANCH=${params.TESTSUITE_BRANCH}") + variables.add("-e STORM_BE_HOST=${params.STORM_BE_HOST}") + variables.add("-e CDMI_ENDPOINT=${params.CDMI_ENDPOINT}") + variables.add("-e TESTSUITE_EXCLUDE=${params.TESTSUITE_EXCLUDE}") + variables.add("-e TESTSUITE_SUITE=${params.TESTSUITE_SUITE}") + variables.add("-e CDMI_CLIENT_ID=${CDMI_CLIENT_ID}") + variables.add("-e CDMI_CLIENT_SECRET=${CDMI_CLIENT_SECRET}") + variables.add("-e IAM_USER_NAME=${IAM_USER_NAME}") + variables.add("-e IAM_USER_PASSWORD=${IAM_USER_PASSWORD}") + variables.add("-e STORM_STORAGE_ROOT_DIR=${params.STORM_STORAGE_ROOT_DIR}") + envvars = variables.join(' ') + echo "env-vars: ${envvars}" + + sh returnStatus: true, script: "docker run --name ${name} ${envvars} ${image}" + + sh "docker cp ${name}:/home/tester/storm-testsuite/reports ." + archive 'reports/**' + + step([$class: 'RobotPublisher', + disableArchiveOutput: false, + logFileName: 'log.html', + otherFiles: '*.png', + outputFileName: 'output.xml', + outputPath: "reports", + passThreshold: 100, + reportFileName: 'report.html', + unstableThreshold: 90]) + } + } + } + } + } + } + + post { + failure { + slackSend color: 'danger', message: "${env.JOB_NAME} - #${env.BUILD_NUMBER} Failure (<${env.BUILD_URL}|Open>)" + } + + changed { + script{ + if('SUCCESS'.equals(currentBuild.currentResult)) { + slackSend color: 'good', message: "${env.JOB_NAME} - #${env.BUILD_NUMBER} Back to normal (<${env.BUILD_URL}|Open>)" + } + } + } + } +} diff --git a/jenkins/pod.yaml b/jenkins/pod.yaml new file mode 100644 index 0000000..ac5b52f --- /dev/null +++ b/jenkins/pod.yaml @@ -0,0 +1,45 @@ +apiVersion: v1 +kind: Pod +metadata: + labels: + some-label: some-label-value +spec: + nodeSelector: + zone: ci-test + imagePullSecrets: + - name: cloud-vm114 + volumes: + - name: docker + hostPath: + path: /var/run/docker.sock + - name: registry + secret: + secretName: registry-auth-basic + - name: ssh + secret: + secretName: jenkins-ssh-keys + - name: scratch + persistentVolumeClaim: + claimName: scratch-area-claim + containers: + - name: kube-docker-runner + image: cloud-vm114.cloud.cnaf.infn.it/italiangrid/kube-docker-runner:latest + command: + - cat + tty: true + volumeMounts: + - name: docker + mountPath: /var/run/docker.sock + - name: registry + mountPath: /home/jenkins/.docker + - name: ssh + mountPath: /home/jenkins/.ssh + - name: scratch + mountPath: /srv/scratch + resources: + requests: + memory: 500Mi + cpu: 0.7 + limits: + memory: 600Mi + cpu: 1 From 3ee6a0ca8189b27b99411aca783f074da968ea0c Mon Sep 17 00:00:00 2001 From: enricovianello Date: Fri, 7 Dec 2018 09:18:55 +0100 Subject: [PATCH 5/9] set testsuite branch as current branch name in Jenkinsfile --- Jenkinsfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2f3efae..28e1570 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,7 +14,6 @@ pipeline { } parameters { - choice(choices: 'develop\nmaster\nrelease/1.11.15', description: '', name: 'TESTSUITE_BRANCH') string(defaultValue: "omii006-vm03.cnaf.infn.it", description: '', name: 'STORM_BE_HOST') string(defaultValue: "omii003-vm01.cnaf.infn.it:8888", description: '', name: 'CDMI_ENDPOINT') string(defaultValue: "to-be-fixed", description: '', name: 'TESTSUITE_EXCLUDE') @@ -41,7 +40,7 @@ pipeline { echo "name: ${name}" def variables = [] - variables.add("-e TESTSUITE_BRANCH=${params.TESTSUITE_BRANCH}") + variables.add("-e TESTSUITE_BRANCH=${env.BRANCH_NAME}") variables.add("-e STORM_BE_HOST=${params.STORM_BE_HOST}") variables.add("-e CDMI_ENDPOINT=${params.CDMI_ENDPOINT}") variables.add("-e TESTSUITE_EXCLUDE=${params.TESTSUITE_EXCLUDE}") From 1b678600ebc175016a1a9b0f98bee1547b16f830 Mon Sep 17 00:00:00 2001 From: enricovianello Date: Fri, 7 Dec 2018 16:51:34 +0100 Subject: [PATCH 6/9] use dockerhub image --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 28e1570..a9b2eee 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -31,7 +31,7 @@ pipeline { usernamePassword(credentialsId: 'a5ca708a-eca8-4fc0-83cd-eb3695f083a1', passwordVariable: 'IAM_USER_PASSWORD', usernameVariable: 'IAM_USER_NAME') ]) { - def image = "${env.DOCKER_REGISTRY_HOST}/italiangrid/storm-testsuite:latest" + def image = "italiangrid/storm-testsuite:latest" echo "image: ${image}" sh "docker pull ${image}" From 0b86d518f6f93edd017c031e452530edd7e1c5a2 Mon Sep 17 00:00:00 2001 From: enricovianello Date: Fri, 21 Dec 2018 13:43:44 +0000 Subject: [PATCH 7/9] Migrated to gfal library --- lib/cdmi.robot | 3 +- lib/curl.robot | 6 +- lib/filetransfer.robot | 11 +- lib/gfal_util.robot | 47 ++++++++ lib/import.robot | 4 +- lib/metadata.robot | 6 +- lib/oidc.robot | 3 +- lib/recall.robot | 30 ++--- lib/webdav.robot | 105 ++++++++++-------- tests/glue/2_0/glue_2_0.robot | 9 +- tests/srm/commands/srmLs.robot | 14 +-- tests/srm/commands/srmMv.robot | 26 ++--- tests/srm/data_transfer/data_transfer.robot | 13 ++- .../dcache_srmclient/dcache_srmclient.robot | 51 ++++----- tests/srm/lcg_utils/lcg_utils.robot | 46 ++++---- tests/srm/mixedtests.robot | 8 +- .../space_management/space_management.robot | 6 +- .../space_management/used_space_info.robot | 14 +-- tests/srm/tests.robot | 8 +- 19 files changed, 240 insertions(+), 170 deletions(-) create mode 100644 lib/gfal_util.robot diff --git a/lib/cdmi.robot b/lib/cdmi.robot index 8d9378f..3bc3cb0 100644 --- a/lib/cdmi.robot +++ b/lib/cdmi.robot @@ -29,7 +29,8 @@ Get CDMI Status [Arguments] ${path} ${credentials} [Return] ${data} Get Json Data [Arguments] ${url} ${options} - ${output} ${stderr} Curl GET ${url} ${options} + ${output} ${rc} Curl GET ${url} ${options} + Should Be Equal As Integers ${rc} 0 ${jsonData} = Get Line ${output} -1 ${parsedData} Parse Json ${jsonData} [Return] ${parsedData} diff --git a/lib/curl.robot b/lib/curl.robot index 4dd2501..d156270 100644 --- a/lib/curl.robot +++ b/lib/curl.robot @@ -3,10 +3,10 @@ ### COMMAND ### Curl [Arguments] ${method} ${url} ${options}=${EMPTY} - ${output} ${stderr} Execute and Check Success curl ${options} ${url} -X ${method} -s -L -iv + ${rc} ${output} Run And Return Rc And Output curl ${options} ${url} -X ${method} -s -L -iv Log ${output} - Log ${stderr} - [Return] ${output} ${stderr} + Log ${rc} + [Return] ${output} ${rc} ### OPTIONS ### diff --git a/lib/filetransfer.robot b/lib/filetransfer.robot index cf18412..d69944f 100644 --- a/lib/filetransfer.robot +++ b/lib/filetransfer.robot @@ -10,16 +10,19 @@ Build FileTransfer URL [Arguments] ${endpoint} ${path} FileTransfer GET [Arguments] ${endpoint} ${storageArea} ${relativePath} ${credentials}=${EMPTY} ${url} Build FileTransfer URL ${endpoint} ${storageArea}/${relativePath} - ${output} Curl GET ${url} ${credentials} -iv + ${output} ${rc} Curl GET ${url} ${credentials} -iv + Should Be Equal As Integers ${rc} 0 [Return] ${output} FileTransfer PUT file [Arguments] ${endpoint} ${storageArea} ${relativePath} ${localFilePath} ${credentials}=${EMPTY} ${url} Build FileTransfer URL ${endpoint} ${storageArea}/${relativePath} - ${output} Curl PUT ${url} -T ${localFilePath} -iv ${credentials} + ${output} ${rc} Curl PUT ${url} -T ${localFilePath} -iv ${credentials} + Should Be Equal As Integers ${rc} 0 [Return] ${output} FileTransfer PUT data [Arguments] ${endpoint} ${storageArea} ${relativePath} ${data} ${credentials}=${EMPTY} ${body} Set body ${data} ${url} Build FileTransfer URL ${endpoint} ${storageArea}/${relativePath} - ${output} Curl PUT ${url} ${body} -iv ${credentials} - [Return] ${output} \ No newline at end of file + ${output} ${rc} Curl PUT ${url} ${body} -iv ${credentials} + Should Be Equal As Integers ${rc} 0 + [Return] ${output} diff --git a/lib/gfal_util.robot b/lib/gfal_util.robot new file mode 100644 index 0000000..93a810b --- /dev/null +++ b/lib/gfal_util.robot @@ -0,0 +1,47 @@ +*** Keywords *** + +List files in directory using gfal-utils [Arguments] ${surl} ${expectedRc}=0 ${expectedContent}=${EMPTY} + ${rc} ${output} Run And Return Rc And Output gfal-ls -laH ${surl} + Log ${output} + Should Be Equal As Integers ${rc} ${expectedRc} + Should Contain ${output} ${expectedContent} + [Return] ${output} + +Check surl exists using gfal-utils [Arguments] ${surl} + ${rc} ${output} Run And Return Rc And Output gfal-stat ${surl} + Log ${output} + Should Be Equal As Integers ${rc} 0 + [Return] ${output} + +Check surl does not exists using gfal-utils [Arguments] ${surl} + ${rc} ${output} Run And Return Rc And Output gfal-stat ${surl} + Log ${output} + Should Be Equal As Integers ${rc} 2 + Should Contain ${output} No such file or directory + Should Contain ${output} SRM_INVALID_PATH + [Return] ${output} + +Copy-out file using gfal-utils [Arguments] ${localFileName} ${surl} ${options}=${EMPTY} + ${rc} ${output} Run And Return Rc And Output gfal-copy -v ${options} file:///tmp/${TESTDIR}/${localFileName} ${surl} + Log ${output} + Run Keyword If ${rc}!=0 Fail "Exit code value is ${rc} instead of 0" + [Return] ${output} + +Copy-in file using gfal-utils [Arguments] ${surl} ${localFileName} + ${rc} ${output} Run And Return Rc And Output gfal-copy -v ${surl} file:///tmp/${TESTDIR}/${localFileName} + Log ${output} + Run Keyword If ${rc}!=0 Fail "Exit code value is ${rc} instead of 0" + [Return] ${output} + +Copy file using gfal-utils [Arguments] ${srcSurl} ${destSurl} ${options}=${EMPTY} + ${rc} ${output} Run And Return Rc And Output gfal-copy -v ${options} ${srcSurl} ${destSurl} + Log ${output} + Run Keyword If ${rc}!=0 Fail "Exit code value is ${rc} instead of 0" + [Return] ${output} + +Get checksum of remote file using gfal-utils [Arguments] ${surl} ${algorithm}=adler32 + ${rc} ${output} Run And Return Rc And Output gfal-sum ${surl} ${algorithm} + Log ${output} + Should Be Equal As Integers ${rc} 0 + ${rest} ${last}= Split String From Right ${output} + [Return] ${last} diff --git a/lib/import.robot b/lib/import.robot index 0d5e9d3..fc39fc4 100644 --- a/lib/import.robot +++ b/lib/import.robot @@ -15,11 +15,11 @@ Resource dcache.robot Resource filetransfer.robot Resource globus_util.robot Resource infosystem.robot -Resource lcg_util.robot +Resource gfal_util.robot Resource metadata.robot Resource oidc.robot Resource recall.robot Resource setup.robot Resource stormlib.robot Resource webdav_util.robot -Resource webdav.robot \ No newline at end of file +Resource webdav.robot diff --git a/lib/metadata.robot b/lib/metadata.robot index 3e8b413..dba158b 100644 --- a/lib/metadata.robot +++ b/lib/metadata.robot @@ -6,11 +6,13 @@ Get metadata of [Arguments] ${sa} ${path} [Return] ${data} Request Metadata For [Arguments] ${sa} ${path} - ${output} ${stderr} Curl GET http://${recallEndpoint}/metadata/${sa}/${path} -H "Token:${xmlrpcToken}" + ${output} ${rc} Curl GET http://${recallEndpoint}/metadata/${sa}/${path} -H "Token:${xmlrpcToken}" + Should Be Equal As Integers ${rc} 0 [Return] ${output} Unauthorized Request Metadata For [Arguments] ${sa} ${path} - ${output} ${stderr} Curl GET http://${recallEndpoint}/metadata/${sa}/${path} + ${output} ${rc} Curl GET http://${recallEndpoint}/metadata/${sa}/${path} + Should Be Equal As Integers ${rc} 0 [Return] ${output} Parse Metadata [Arguments] ${httpRepsonse} diff --git a/lib/oidc.robot b/lib/oidc.robot index ab56499..1af20c0 100644 --- a/lib/oidc.robot +++ b/lib/oidc.robot @@ -5,7 +5,8 @@ Get Access Token [Arguments] ${clientId} ${clientSecret} ${username} ${pass ${contentType}= Set Variable -H "Content-Type: application/x-www-form-urlencoded" ${credentials}= Set Variable -u "${clientId}:${clientSecret}" ${data}= Set Variable -d "grant_type=password" -d "scope=${scopes}" -d "username=${username}" -d "password=${password}" - ${out} ${err} Curl POST ${tokenUrl} ${contentType} ${credentials} ${data} + ${out} ${rc} Curl POST ${tokenUrl} ${contentType} ${credentials} ${data} + Should Be Equal As Integers ${rc} 0 ${jsonData} = Get Line ${out} -1 ${parsedData} Parse Json ${jsonData} [Return] ${parsedData["access_token"]} diff --git a/lib/recall.robot b/lib/recall.robot index a6eeb8b..3be403a 100644 --- a/lib/recall.robot +++ b/lib/recall.robot @@ -1,38 +1,38 @@ *** Keywords *** Get recall requests in progress [Arguments] ${maxResults} - ${output} ${stderr} Curl GET http://${recallEndpoint}/recalltable/task?maxResults=${maxResults} -i -H "Token:${xmlrpcToken}" - Log ${output} + ${output} ${rc} Curl GET http://${recallEndpoint}/recalltable/task?maxResults=${maxResults} -i -H "Token:${xmlrpcToken}" + Should Be Equal As Integers ${rc} 0 [Return] ${output} Get and update to progress recall tasks ready for being taken over [Arguments] ${maxResults} - ${output} ${stderr} Curl PUT http://${recallEndpoint}/recalltable/tasks -i -s -S -H "Content-Type:text/plain" -H "Token:${xmlrpcToken}" -d first=${maxResults} - Log ${output} + ${output} ${rc} Curl PUT http://${recallEndpoint}/recalltable/tasks -i -s -S -H "Content-Type:text/plain" -H "Token:${xmlrpcToken}" -d first=${maxResults} + Should Be Equal As Integers ${rc} 0 [Return] ${output} Update a recall task status using a groupTaskId [Arguments] ${groupTaskId} ${status} - ${output} ${stderr} Curl PUT http://${recallEndpoint}/recalltable/task/${groupTaskId} -i -s -S -H "Content-Type:text/plain" -H "Token:${xmlrpcToken}" -d status=${status} - Log ${output} + ${output} ${rc} Curl PUT http://${recallEndpoint}/recalltable/task/${groupTaskId} -i -s -S -H "Content-Type:text/plain" -H "Token:${xmlrpcToken}" -d status=${status} + Should Be Equal As Integers ${rc} 0 [Return] ${output} Check for a completed recall task [Arguments] ${requestToken} ${fileName} - ${output} ${stderr} Curl PUT http://${recallEndpoint}/recalltable/task -i -H "Content-Type:text/plain" -H "Token:${xmlrpcToken}" -d $'requestToken=${requestToken}\nsurl=srm://${srmEndpoint}/srm/managerv2?SFN=/${TAPE_SA}/${fileName}' - Log ${output} + ${output} ${rc} Curl PUT http://${recallEndpoint}/recalltable/task -i -H "Content-Type:text/plain" -H "Token:${xmlrpcToken}" -d $'requestToken=${requestToken}\nsurl=srm://${srmEndpoint}/srm/managerv2?SFN=/${TAPE_SA}/${fileName}' + Should Be Equal As Integers ${rc} 0 [Return] ${output} Insert new recall request [Arguments] ${absoluteFilePath} ${userId} - ${output} ${stderr} Curl POST http://${recallEndpoint}/recalltable/task -i -H "Content-Type:application/json" -H "Token:${xmlrpcToken}" -d '{fileName:${absoluteFilePath},userId:${userId}}' - Log ${output} + ${output} ${rc} Curl POST http://${recallEndpoint}/recalltable/task -i -H "Content-Type:application/json" -H "Token:${xmlrpcToken}" -d '{fileName:${absoluteFilePath},userId:${userId}}' + Should Be Equal As Integers ${rc} 0 [Return] ${output} Get first recall task - ${output} ${stderr} Curl PUT http://${recallEndpoint}/recalltable/tasks -s -S -H "Content-Type:text/plain" -H "Token:${xmlrpcToken}" -d first=1 - Log ${output} + ${output} ${rc} Curl PUT http://${recallEndpoint}/recalltable/tasks -s -S -H "Content-Type:text/plain" -H "Token:${xmlrpcToken}" -d first=1 + Should Be Equal As Integers ${rc} 0 ${data} = Get Line ${output} -1 Log ${data} [Return] ${data} Set success for taskid [Arguments] ${taskId} - ${output} ${stderr} Curl PUT http://${recallEndpoint}/recalltable/task/${taskId} -s -S -H "Content-Type:text/plain" -H "Token:${xmlrpcToken}" -d "status=0" - Log ${output} - [Return] ${output} \ No newline at end of file + ${output} ${rc} Curl PUT http://${recallEndpoint}/recalltable/task/${taskId} -s -S -H "Content-Type:text/plain" -H "Token:${xmlrpcToken}" -d "status=0" + Should Be Equal As Integers ${rc} 0 + [Return] ${output} diff --git a/lib/webdav.robot b/lib/webdav.robot index cf5ce38..d9ad65d 100644 --- a/lib/webdav.robot +++ b/lib/webdav.robot @@ -3,112 +3,125 @@ ##### HTTP/WEBDAV METHODS - CURL KEYWORDS Do CURL HEAD [Arguments] ${url} ${options}=${EMPTY} - ${output} ${stderr} Curl HEAD ${url} --head ${options} - [Return] ${output} ${stderr} + ${output} ${rc} Curl HEAD ${url} --head ${options} + [Return] ${output} ${rc} Do CURL HEAD and check success [Arguments] ${url} ${options}=${EMPTY} - ${output} ${stderr} Do CURL HEAD ${url} ${options} + ${output} ${rc} Do CURL HEAD ${url} ${options} + Should Be Equal As Integers ${rc} 0 Should Contain ${output} 200 OK - [Return] ${output} ${stderr} + [Return] ${output} ${rc} Do CURL GET [Arguments] ${url} ${options}=${EMPTY} - ${output} ${stderr} Curl GET ${url} ${options} - [Return] ${output} ${stderr} + ${output} ${rc} Curl GET ${url} ${options} + [Return] ${output} ${rc} Do CURL GET and check success [Arguments] ${url} ${options}=${EMPTY} - ${output} ${stderr} Do CURL GET ${url} ${options} + ${output} ${rc} Do CURL GET ${url} ${options} Should Contain ${output} 200 OK - [Return] ${output} ${stderr} + Should Be Equal As Integers ${rc} 0 + [Return] ${output} ${rc} Do CURL partial GET [Arguments] ${url} ${rangelist} ${options}=${EMPTY} ${rangeheader} Get CURL header Range bytes=${rangelist} - ${output} ${stderr} Do CURL GET ${url} ${rangeheader} ${options} - [Return] ${output} ${stderr} + ${output} ${rc} Do CURL GET ${url} ${rangeheader} ${options} + [Return] ${output} ${rc} Do CURL partial GET and check success [Arguments] ${url} ${rangelist} ${options}=${EMPTY} - ${output} ${stderr} Do CURL partial GET ${url} ${rangelist} ${options} + ${output} ${rc} Do CURL partial GET ${url} ${rangelist} ${options} + Should Be Equal As Integers ${rc} 0 Should Contain ${output} 206 Partial Content - [Return] ${output} ${stderr} + [Return] ${output} ${rc} Do CURL PUT [Arguments] ${url} ${localFilePath} ${options}=${EMPTY} - ${output} ${stderr} Curl PUT ${url} -T ${localFilePath} ${options} - [Return] ${output} ${stderr} + ${output} ${rc} Curl PUT ${url} -T ${localFilePath} ${options} + [Return] ${output} ${rc} Do CURL PUT and check success [Arguments] ${url} ${localFilePath} ${options}=${EMPTY} - ${output} ${stderr} Curl PUT ${url} -T ${localFilePath} ${options} + ${output} ${rc} Curl PUT ${url} -T ${localFilePath} ${options} + Should Be Equal As Integers ${rc} 0 Should Contain ${output} 201 Created - [Return] ${output} ${stderr} + [Return] ${output} ${rc} Do CURL PUT and check overwrite success [Arguments] ${url} ${localFilePath} ${options}=${EMPTY} - ${output} ${stderr} Curl PUT ${url} -T ${localFilePath} ${options} + ${output} ${rc} Curl PUT ${url} -T ${localFilePath} ${options} + Should Be Equal As Integers ${rc} 0 Should Contain ${output} 204 No Content - [Return] ${output} ${stderr} + [Return] ${output} ${rc} Do CURL MKCOL [Arguments] ${url} ${options}=${EMPTY} - ${output} ${stderr} Curl MKCOL ${url} ${options} - [Return] ${output} ${stderr} + ${output} ${rc} Curl MKCOL ${url} ${options} + [Return] ${output} ${rc} Do CURL MKCOL and check success [Arguments] ${url} ${options}=${EMPTY} - ${output} ${stderr} Do CURL MKCOL ${url} ${options} + ${output} ${rc} Do CURL MKCOL ${url} ${options} + Should Be Equal As Integers ${rc} 0 Should Contain ${output} 201 Created - [Return] ${output} ${stderr} + [Return] ${output} ${rc} Do CURL DELETE [Arguments] ${url} ${options}=${EMPTY} - ${output} ${stderr} Curl DELETE ${url} ${options} - [Return] ${output} ${stderr} + ${output} ${rc} Curl DELETE ${url} ${options} + [Return] ${output} ${rc} Do CURL DELETE and check success [Arguments] ${url} ${options}=${EMPTY} - ${output} ${stderr} Do CURL DELETE ${url} ${options} + ${output} ${rc} Do CURL DELETE ${url} ${options} + Should Be Equal As Integers ${rc} 0 Should Contain ${output} 204 No Content - [Return] ${output} ${stderr} + [Return] ${output} ${rc} Do CURL COPY [Arguments] ${srcURL} ${destURL} ${options}=${EMPTY} ${destHeader} Get CURL header Destination ${destURL} - ${output} ${stderr} Curl COPY ${srcURL} ${destHeader} ${options} - [Return] ${output} ${stderr} + ${output} ${rc} Curl COPY ${srcURL} ${destHeader} ${options} + [Return] ${output} ${rc} Do CURL COPY and check success [Arguments] ${srcURL} ${destURL} ${options}=${EMPTY} - ${output} ${stderr} Do CURL COPY ${srcURL} ${destURL} ${options} + ${output} ${rc} Do CURL COPY ${srcURL} ${destURL} ${options} + Should Be Equal As Integers ${rc} 0 Should Contain ${output} 201 Created - [Return] ${output} ${stderr} + [Return] ${output} ${rc} Do CURL COPY and check overwrite success [Arguments] ${srcURL} ${destURL} ${options}=${EMPTY} - ${output} ${stderr} Do CURL COPY ${srcURL} ${destURL} ${options} + ${output} ${rc} Do CURL COPY ${srcURL} ${destURL} ${options} + Should Be Equal As Integers ${rc} 0 Should Contain ${output} 204 No Content - [Return] ${output} ${stderr} + [Return] ${output} ${rc} Do CURL MOVE [Arguments] ${srcURL} ${destURL} ${options}=${EMPTY} ${destHeader} Get CURL header Destination ${destURL} - ${output} ${stderr} Curl MOVE ${srcURL} ${destHeader} ${options} - [Return] ${output} ${stderr} + ${output} ${rc} Curl MOVE ${srcURL} ${destHeader} ${options} + [Return] ${output} ${rc} Do CURL MOVE and check success [Arguments] ${srcURL} ${destURL} ${options}=${EMPTY} - ${output} ${stderr} Do CURL MOVE ${srcURL} ${destURL} ${options} + ${output} ${rc} Do CURL MOVE ${srcURL} ${destURL} ${options} + Should Be Equal As Integers ${rc} 0 Should Contain ${output} 201 Created - [Return] ${output} ${stderr} + [Return] ${output} ${rc} Do CURL MOVE and check overwrite success [Arguments] ${srcURL} ${destURL} ${options}=${EMPTY} - ${output} ${stderr} Do CURL MOVE ${srcURL} ${destURL} ${options} + ${output} ${rc} Do CURL MOVE ${srcURL} ${destURL} ${options} + Should Be Equal As Integers ${rc} 0 Should Contain ${output} 204 No Content - [Return] ${output} ${stderr} + [Return] ${output} ${rc} Do CURL PROPFIND [Arguments] ${url} ${bodyContent} ${options}=${EMPTY} ${body} Get CURL body ${bodyContent} - ${output} ${stderr} Curl PROPFIND ${url} ${body} ${options} - [Return] ${output} ${stderr} + ${output} ${rc} Curl PROPFIND ${url} ${body} ${options} + [Return] ${output} ${rc} Do CURL PROPFIND and check success [Arguments] ${url} ${bodyContent} ${options}=${EMPTY} - ${output} ${stderr} Do CURL PROPFIND ${url} ${bodyContent} ${options} + ${output} ${rc} Do CURL PROPFIND ${url} ${bodyContent} ${options} + Should Be Equal As Integers ${rc} 0 Should Contain ${output} 207 Multi-status - [Return] ${output} ${stderr} + [Return] ${output} ${rc} Do CURL OPTIONS [Arguments] ${url} ${options}=${EMPTY} - ${output} ${stderr} Curl OPTIONS ${url} ${options} - [Return] ${output} ${stderr} + ${output} ${rc} Curl OPTIONS ${url} ${options} + [Return] ${output} ${rc} Do CURL OPTIONS and check success [Arguments] ${url} ${options}=${EMPTY} - ${output} ${stderr} Do CURL OPTIONS ${url} ${options} + ${output} ${rc} Do CURL OPTIONS ${url} ${options} + Should Be Equal As Integers ${rc} 0 Should Contain ${output} 200 OK Should Contain ${output} DAV: 1 - [Return] ${output} ${stderr} + [Return] ${output} ${rc} diff --git a/tests/glue/2_0/glue_2_0.robot b/tests/glue/2_0/glue_2_0.robot index 83e4a7f..a2eaf79 100644 --- a/tests/glue/2_0/glue_2_0.robot +++ b/tests/glue/2_0/glue_2_0.robot @@ -79,11 +79,10 @@ Check that GLUE2StorageServiceCapacityTotalSize for the online capacity type is ${lurl} Build lurl ${filterGlue2StorageServiceCapacity} Define filter to get GLUE2StorageServiceCapacity size online ${output} Get attribute value using ldapsearch ${lurl} ${baseDNGlue2} ${filterGlue2StorageServiceCapacity} GLUE2StorageServiceCapacityTotalSize - ${lines} Get Lines Containing String ${output} GLUE2StorageServiceCapacityTotalSize - :FOR ${line} in ${lines} - \ ${first} ${others}= Split String ${line} :${SPACE} 1 - \ ${val} Get From List ${others} 1 - \ Should Not Be Equal '${val}' '0' + ${lines} Get Lines Containing String ${output} GLUE2StorageServiceCapacityTotalSize: + :FOR ${line} IN ${lines} + \ ${others} ${last}= Split String From Right ${line} + \ Should Not Be Equal '${last}' '0' Check that GLUE2EndpointServingState does not contain emi.storm.backend [Tags] information-system diff --git a/tests/srm/commands/srmLs.robot b/tests/srm/commands/srmLs.robot index c3b428f..da27e94 100644 --- a/tests/srm/commands/srmLs.robot +++ b/tests/srm/commands/srmLs.robot @@ -52,7 +52,7 @@ List existent file [Setup] Use default voms proxy ${filename} Create local file ${surl} Build surl ${DEFAULT_SA} ${TESTDIR}/${filename} - Copy-out file using lcg-utils ${filename} ${surl} + Copy-out file using gfal-utils ${filename} ${surl} ${output} Perform ls using clientSRM ${surl} Should Contain ${output} SRM_SUCCESS Should Contain ${output} path="/${DEFAULT_SA}/${TESTDIR}/${filename}" @@ -100,7 +100,7 @@ Full detailed list of existent file [Setup] Use default voms proxy ${filename} Create local file ${surl} Build surl ${DEFAULT_SA} ${TESTDIR}/${filename} - Copy-out file using lcg-utils ${filename} ${surl} + Copy-out file using gfal-utils ${filename} ${surl} ${output} Perform ls using clientSRM ${surl} -l 1 -n 0 Should Contain ${output} SRM_SUCCESS Should Contain ${output} path="/${DEFAULT_SA}/${TESTDIR}/${filename}" @@ -131,8 +131,8 @@ Full detailed and recursive list of existent files and directories Should Contain ${output} SRM_SUCCESS ${output} Perform mkdir using clientSRM ${subdirsurl} Should Contain ${output} SRM_SUCCESS - Copy-out file using lcg-utils ${filename} ${filesurl} - Copy-out file using lcg-utils ${filename} ${subdirfilesurl} + Copy-out file using gfal-utils ${filename} ${filesurl} + Copy-out file using gfal-utils ${filename} ${subdirfilesurl} ${output} Perform ls using clientSRM ${dirsurl} -r -l 1 Should Contain ${output} SRM_SUCCESS Should Contain ${output} path="/${DEFAULT_SA}/${TESTDIR}/${dirname}" @@ -228,7 +228,7 @@ Ls on some symlinks that point to other storage-areas [Teardown] Clear all credentials Check approached VFS with nested accesspoints - [Tags] ls lcg-utils nested storm-client + [Tags] ls nested storm-client [Setup] Use voms proxy ${defaultUser} ${NESTED_SA_VONAME} ${dirname} Get a unique name ${filename} Create local file @@ -236,7 +236,7 @@ Check approached VFS with nested accesspoints ${surlFile} Build surl ${NESTED_SA} ${TESTDIR}/${dirname}/${filename} ${output} Perform mkdir using clientSRM ${surlDir} Should Contain ${output} SRM_SUCCESS - Copy-out file using lcg-utils ${filename} ${surlFile} + Copy-out file using gfal-utils ${filename} ${surlFile} ${output} Perform ls using clientSRM ${surlDir} Should Contain ${output} SRM_SUCCESS Should Contain ${output} ${NESTED_SA}/${TESTDIR}/${dirname} @@ -257,4 +257,4 @@ Check approached VFS with aliased accesspoint Should Contain ${output} SRM_SUCCESS Should Contain ${output} ${ALIASED_SA}/${TESTDIR}/${dirname} Should Contain ${output} ${ALIASED_SA}/${TESTDIR}/${dirname}/${filename} - [Teardown] Clear all credentials \ No newline at end of file + [Teardown] Clear all credentials diff --git a/tests/srm/commands/srmMv.robot b/tests/srm/commands/srmMv.robot index 3ed7ecd..36f8bc3 100644 --- a/tests/srm/commands/srmMv.robot +++ b/tests/srm/commands/srmMv.robot @@ -10,7 +10,7 @@ Move file ${filename} Create local file ${srcsurl} Build surl ${DEFAULT_SA} ${TESTDIR}/${filename} ${destsurl} Build surl ${DEFAULT_SA} ${TESTDIR}/${filename}.moved - Copy-out file using lcg-utils ${filename} ${srcsurl} + Copy-out file using gfal-utils ${filename} ${srcsurl} ${output} Perform mv using clientSRM ${srcsurl} ${destsurl} Should Contain ${output} SRM_SUCCESS ${output} Perform ls using clientSRM ${srcsurl} @@ -28,8 +28,8 @@ Move file to a destination surl that already exists ${filename} Create local file ${srcsurl} Build surl ${DEFAULT_SA} ${TESTDIR}/${filename} ${destsurl} Build surl ${DEFAULT_SA} ${TESTDIR}/${filename}.moved - Copy-out file using lcg-utils ${filename} ${srcsurl} - Copy-out file using lcg-utils ${filename} ${destsurl} + Copy-out file using gfal-utils ${filename} ${srcsurl} + Copy-out file using gfal-utils ${filename} ${destsurl} ${output} Perform mv using clientSRM ${srcsurl} ${destsurl} Should Contain ${output} SRM_DUPLICATION_ERROR ${output} Perform rm using clientSRM ${srcsurl} @@ -47,7 +47,7 @@ Move file into directory ${srcfilesurl} Build surl ${DEFAULT_SA} ${TESTDIR}/${filename} ${destdirsurl} Build surl ${DEFAULT_SA} ${TESTDIR}/${dstdirname} ${destfilesurl} Build surl ${DEFAULT_SA} ${TESTDIR}/${dstdirname}/${filename} - Copy-out file using lcg-utils ${filename} ${srcfilesurl} + Copy-out file using gfal-utils ${filename} ${srcfilesurl} ${output} Perform mkdir using clientSRM ${destdirsurl} Should Contain ${output} SRM_SUCCESS ${output} Perform mv using clientSRM ${srcfilesurl} ${destdirsurl} @@ -69,7 +69,7 @@ Move not empty directory on unexistent surl ${destdirsurl} Build surl ${DEFAULT_SA} ${dirname}.moved ${output} Perform mkdir using clientSRM ${dirsurl} Should Contain ${output} SRM_SUCCESS - Copy-out file using lcg-utils ${filename} ${filesurl} + Copy-out file using gfal-utils ${filename} ${filesurl} ${output} Perform mv using clientSRM ${dirsurl} ${destdirsurl} Should Contain ${output} SRM_SUCCESS ${output} Perform rmdir using clientSRM ${destdirsurl} -r @@ -88,7 +88,7 @@ Move not empty directory on a existent empty directory ${destfilesurl} Build surl ${DEFAULT_SA} ${TESTDIR}/${dirname}.moved/${dirname}/${filename} ${output} Perform mkdir using clientSRM ${dirsurl} Should Contain ${output} SRM_SUCCESS - Copy-out file using lcg-utils ${filename} ${filesurl} + Copy-out file using gfal-utils ${filename} ${filesurl} ${output} Perform mkdir using clientSRM ${destdirsurl} Should Contain ${output} SRM_SUCCESS ${output} Perform mv using clientSRM ${dirsurl} ${destdirsurl} @@ -110,8 +110,8 @@ Move not empty directory on a existent surl ${destsurl} Build surl ${DEFAULT_SA} ${TESTDIR}/${filename}.copied ${output} Perform mkdir using clientSRM ${dirsurl} Should Contain ${output} SRM_SUCCESS - Copy-out file using lcg-utils ${filename} ${filesurl} - Copy-out file using lcg-utils ${filename} ${destsurl} + Copy-out file using gfal-utils ${filename} ${filesurl} + Copy-out file using gfal-utils ${filename} ${destsurl} ${output} Perform mv using clientSRM ${dirsurl} ${destsurl} Should Contain ${output} SRM_DUPLICATION_ERROR ${output} Perform rmdir using clientSRM ${dirsurl} -r @@ -132,7 +132,7 @@ Move not empty directory on a existent not empty directory that contains an exis ${destsubdirsurl} Build surl ${DEFAULT_SA} ${TESTDIR}/${dirname}.moved/${dirname} ${output} Perform mkdir using clientSRM ${dirsurl} Should Contain ${output} SRM_SUCCESS - Copy-out file using lcg-utils ${filename} ${filesurl} + Copy-out file using gfal-utils ${filename} ${filesurl} ${output} Perform mkdir using clientSRM ${destdirsurl} Should Contain ${output} SRM_SUCCESS ${output} Perform mkdir using clientSRM ${destsubdirsurl} @@ -152,7 +152,7 @@ Move file over itself ${filename} Create local file ${srcsurl} Build surl ${DEFAULT_SA} ${TESTDIR}/${filename} ${destsurl} Build surl ${DEFAULT_SA} ${TESTDIR}/${filename} - Copy-out file using lcg-utils ${filename} ${srcsurl} + Copy-out file using gfal-utils ${filename} ${srcsurl} ${output} Perform mv using clientSRM ${srcsurl} ${destsurl} Should Contain ${output} SRM_SUCCESS ${output} Perform rm using clientSRM ${srcsurl} @@ -166,7 +166,7 @@ Move file with active ptg ${filename} Create local file ${srcsurl} Build surl ${DEFAULT_SA} ${TESTDIR}/${filename} ${destsurl} Build surl ${DEFAULT_SA} ${TESTDIR}/${filename}.moved - Copy-out file using lcg-utils ${filename} ${srcsurl} + Copy-out file using gfal-utils ${filename} ${srcsurl} ${output} ${token} Perform ptg using clientSRM ${srcsurl} -p Should Contain ${output} SRM_FILE_PINNED ${output} Perform mv using clientSRM ${srcsurl} ${destsurl} @@ -200,7 +200,7 @@ Move file on an unauthorized destination ${filename} Create local file ${srcsurl} Build surl ${DEFAULT_SA} ${TESTDIR}/${filename} ${destsurl} Build surl ${DEFAULT_SA} ${TESTDIR}/${filename} - Copy-out file using lcg-utils ${filename} ${srcsurl} + Copy-out file using gfal-utils ${filename} ${srcsurl} Use default grid proxy ${output} Perform mv using clientSRM ${srcsurl} ${destsurl} Should Contain ${output} SRM_AUTHORIZATION_FAILURE @@ -216,7 +216,7 @@ Check unauthorized file move on a different VO ${filename} Create local file ${srcsurl} Build surl ${DEFAULT_SA} ${TESTDIR}/${filename} ${destsurl} Build surl ${DEFAULT_SA} ../${SA.2}/${TESTDIR}/${filename} - Copy-out file using lcg-utils ${filename} ${srcsurl} + Copy-out file using gfal-utils ${filename} ${srcsurl} ${output} Perform mv using clientSRM ${srcsurl} ${destsurl} Should Contain ${output} SRM_AUTHORIZATION_FAILURE ${destsurl} Build surl ${SA.2} ../${DEFAULT_SA}/${TESTDIR}/${filename}_2 diff --git a/tests/srm/data_transfer/data_transfer.robot b/tests/srm/data_transfer/data_transfer.robot index 7414745..4416fd5 100644 --- a/tests/srm/data_transfer/data_transfer.robot +++ b/tests/srm/data_transfer/data_transfer.robot @@ -37,14 +37,14 @@ Test that the SRM service is able to transfer a file from the SRM endpoint [Setup] Use default voms proxy ${filename} Create local file ${surl} Build surl ${DEFAULT_SA} ${TESTDIR}/${filename} - Copy-out file using lcg-utils ${filename} ${surl} + Copy-out file using gfal-utils ${filename} ${surl} ${output} ${token} Perform ptg using clientSRM ${surl} -p -T -P gsiftp ${result} ${turl}= Should Match Regexp ${output} transferURL=(\".+\") Copy-in file using gsiftp protocol ${turl} ${filename} [Teardown] Clear all credentials Check checksum of copied file - [Tags] lcg-utils + [Tags] checksum gridftp [Documentation] StoRM BE must be configured with GRIDFTP_WITH_DSI="yes" to pass this test [Setup] Use default voms proxy ${filename} Create local file @@ -54,7 +54,10 @@ Check checksum of copied file Copy-out file using globus-utils ${filename} ${turl} ${output} Perform pd using clientSRM ${srcsurl} ${token} -p ${destsurl} Build surl ${DEFAULT_SA} ${TESTDIR}/${filename}_copied - ${output} Copy file using lcg-utils ${srcsurl} ${destsurl} --checksum - Log ${output} - Should Contain ${output} Source and destination checksums are matching + ${output} Copy file using gfal-utils ${srcsurl} ${destsurl} + ${checksum1} Get checksum of remote file using gfal-utils ${srcsurl} + ${checksum2} Get checksum of remote file using gfal-utils ${destsurl} + Log ${checksum1} + Log ${checksum2} + Should Be Equal As Strings ${checksum1} ${checksum2} [Teardown] Clear all credentials diff --git a/tests/srm/dcache_srmclient/dcache_srmclient.robot b/tests/srm/dcache_srmclient/dcache_srmclient.robot index 128b49f..89563d0 100644 --- a/tests/srm/dcache_srmclient/dcache_srmclient.robot +++ b/tests/srm/dcache_srmclient/dcache_srmclient.robot @@ -60,42 +60,43 @@ Remove an existent file using dCache client [Setup] Use default voms proxy ${filename} Create local file ${surl} Build surl ${DEFAULT_SA} ${TESTDIR}/${filename} - Check file does not exists using lcg-utils ${surl} - Copy-out file using lcg-utils ${filename} ${surl} - Check file exists using lcg-utils ${surl} + Check surl does not exists using gfal-utils ${surl} + Copy-out file using gfal-utils ${filename} ${surl} + Check surl exists using gfal-utils ${surl} Remove file using dCache client ${surl} Remove local file ${fileName} [Teardown] Clear all credentials Check a file is correctly transferred out, re-transferred in and deleted with dcache client - [Tags] lcg-utils dcache-client + [Tags] gfal-utils dcache-client [Setup] Use default voms proxy ${filename} Create local file ${surl} Build surl ${DEFAULT_SA} ${TESTDIR}/${filename} - Copy-out file using lcg-utils ${filename} ${surl} - Copy-in file using lcg-utils ${surl} ${filename} + Copy-out file using gfal-utils ${filename} ${surl} + Remove local file ${filename} + Copy-in file using gfal-utils ${surl} ${filename} Remove file using dCache client ${surl} Remove local file ${filename} [Teardown] Clear all credentials -Check file copy in/out using lcg-utils, use dcache-client to create/remove dir and file - [Tags] lcg-utils dcache-client +Check file copy in/out using gfal-utils, use dcache-client to create/remove dir and file + [Tags] gfal-utils dcache-client [Setup] Use default voms proxy ${filename} Create local file ${dirName} Get a unique name ${surlDir} Build surl ${DEFAULT_SA} ${TESTDIR}/${dirName} ${surlFile} Build surl ${DEFAULT_SA} ${TESTDIR}/${dirName}/${filename} - ${output} List files in directory using lcg_utils ${surlDir} - Should Contain ${output} No such file or directory + Check surl does not exists using gfal-utils ${surlDir} Create directory using dCache client ${surlDir} ${output} Try to create directory using dCache client ${surlDir} Should Contain ${output} SRM_DUPLICATION_ERROR - ${output} List files in directory using lcg_utils ${surlDir} + ${output} List files in directory using gfal-utils ${surlDir} Should Not Contain ${output} SRM_INVALID_PATH - Copy-out file using lcg-utils ${filename} ${surlFile} - ${output} List files in directory using lcg_utils ${surlDir} + Copy-out file using gfal-utils ${filename} ${surlFile} + ${output} List files in directory using gfal-utils ${surlDir} Should Not Contain ${output} SRM_INVALID_PATH - Copy-in file using lcg-utils ${surlFile} ${filename} + Remove local file ${filename} + Copy-in file using gfal-utils ${surlFile} ${filename} Remove file using dCache client ${surlFile} ${output} Try to remove file using dCache client ${surlFile} Should Contain ${output} SRM_FAILURE @@ -106,28 +107,28 @@ Check file copy in/out using lcg-utils, use dcache-client to create/remove dir a [Teardown] Clear all credentials Check a file is correctly transferred out, the calculate checksum is correct and delete with dcache client - [Tags] lcg-utils dcache-client + [Tags] gfal-utils dcache-client [Setup] Use default voms proxy ${filename} Create local file ${surl} Build surl ${DEFAULT_SA} ${TESTDIR}/${filename} - ${output} List files in directory using lcg_utils ${surl} - Should Contain ${output} SRM_INVALID_PATH - Copy-out file using lcg-utils ${filename} ${surl} - ${output} List files in directory using lcg_utils ${surl} - Should Contain ${output} ADLER32 + Check surl does not exists using gfal-utils ${surl} + List files in directory using gfal-utils ${surl} 2 SRM_INVALID_PATH + Copy-out file using gfal-utils ${filename} ${surl} + ${checksum} Get checksum of remote file using gfal-utils ${surl} ADLER32 + Should Not Be Empty ${checksum} Checksum value should not be empty Remove file using dCache client ${surl} Remove local file ${filename} [Teardown] Clear all credentials Check the correct backend behaviour when a user specifies a DB PWD in the def file - [Tags] lcg-utils dcache-client + [Tags] gfal-utils dcache-client [Documentation] Regression test for https://storm.cnaf.infn.it:8443/redmine/issues/227 [Setup] Use default voms proxy ${filename} Create local file ${surl} Build surl ${DEFAULT_SA} ${TESTDIR}/${filename} - ${output} List files in directory using lcg_utils ${surl} - Should Contain ${output} SRM_INVALID_PATH - Copy-out file using lcg-utils ${filename} ${surl} + Check surl does not exists using gfal-utils ${surl} + List files in directory using gfal-utils ${surl} 2 SRM_INVALID_PATH + Copy-out file using gfal-utils ${filename} ${surl} Remove file using dCache client ${surl} Remove local file ${filename} - [Teardown] Clear all credentials \ No newline at end of file + [Teardown] Clear all credentials diff --git a/tests/srm/lcg_utils/lcg_utils.robot b/tests/srm/lcg_utils/lcg_utils.robot index 0a3cba1..4361bfc 100644 --- a/tests/srm/lcg_utils/lcg_utils.robot +++ b/tests/srm/lcg_utils/lcg_utils.robot @@ -4,8 +4,8 @@ Resource lib/import.robot *** Test Cases *** -List files in an existing directory with lcg-utils - [Tags] lcg-utils ls +List files in an existing directory with gfal-utils + [Tags] gfal-utils ls [Setup] Use default voms proxy ${dirname} Get a unique name ${filename} Create local file @@ -13,67 +13,67 @@ List files in an existing directory with lcg-utils ${surlFile} Build surl ${DEFAULT_SA} ${TESTDIR}/${dirname}/${filename} ${output} Perform mkdir using clientSRM ${surlDir} Should Contain ${output} SRM_SUCCESS - Copy-out file using lcg-utils ${filename} ${surlFile} - ${output} List files in directory using lcg_utils ${surlDir} + Copy-out file using gfal-utils ${filename} ${surlFile} + ${output} List files in directory using gfal-utils ${surlDir} Should Contain ${output} ${filename} ${output} Perform rmdir using clientSRM ${surlDir} -r Should Contain ${output} SRM_SUCCESS [Teardown] Clear all credentials -Check if a lcg-ls on an existent surl works - [Tags] lcg-utils ls +Check if a gfal-ls on an existent surl works + [Tags] gfal-utils ls [Setup] Use default voms proxy ${filename} Create local file ${surl} Build surl ${DEFAULT_SA} ${TESTDIR}/${filename} - Copy-out file using lcg-utils ${filename} ${surl} - Check file exists using lcg-utils ${surl} + Copy-out file using gfal-utils ${filename} ${surl} + Check surl exists using gfal-utils ${surl} ${output} Perform rm using clientSRM ${surl} Should Contain ${output} SRM_SUCCESS Remove local file ${filename} [Teardown] Clear all credentials -Check if a lcg-ls on a non-existent surl fails - [Tags] lcg-utils ls +Check if a gfal-ls on a non-existent surl fails + [Tags] gfal-utils ls [Setup] Use default voms proxy ${filename} Get a unique name ${surl} Build surl ${DEFAULT_SA} ${TESTDIR}/${filename} - Check file does not exists using lcg-utils ${surl} + Check surl does not exists using gfal-utils ${surl} [Teardown] Clear all credentials -Check lcg-cp computed checksum in case it starts with zero +Check gfal-copy computed checksum in case it starts with zero [Documentation] Regression test for https://storm.cnaf.infn.it:8443/redmine/issues/108. Given a file with ADLER32 checksum that starts with '0' and a SURL pointing to a non existent file in an existent folder, verify that after transfering the file on the SURL the checksum value computed for the file matches as string with the one of the local file. - [Tags] lcg-utils regression cp + [Tags] gfal-utils regression cp [Setup] Use default voms proxy ${srcFileName} Create local file with checksum that starts with zero ${destFileName} Get a unique name ${srcSurl} Build surl ${DEFAULT_SA} ${TESTDIR}/${srcFileName} ${destSurl} Build surl ${DEFAULT_SA} ${TESTDIR}/${destFileName} - Copy-out file using lcg-utils ${srcFileName} ${srcSurl} + Copy-out file using gfal-utils ${srcFileName} ${srcSurl} ${output} Detailed ls using clientSRM ${srcSurl} ${result} ${b_checksum}= Should Match Regexp ${output} checkSumValue=(\".+\") Log ${b_checksum} - Copy file using lcg-utils ${srcSurl} ${destSurl} + Copy file using gfal-utils ${srcSurl} ${destSurl} ${output} Detailed ls using clientSRM ${destSurl} ${result} ${a_checksum}= Should Match Regexp ${output} checkSumValue=(\".+\") Log ${a_checksum} Should be equal ${b_checksum} ${a_checksum} [Teardown] Clear all credentials -Test lcg-cp out - [Tags] lcg-utils cp +Test gfal-copy out + [Tags] gfal-utils cp [Setup] Use default voms proxy ${filename} Create local file ${surl} Build surl ${DEFAULT_SA} ${TESTDIR}/${filename} - Copy-out file using lcg-utils ${filename} ${surl} + Copy-out file using gfal-utils ${filename} ${surl} [Teardown] Clear all credentials -Copy out a file using lcg-utils - [Tags] lcg-utils +Copy out a file using gfal-utils + [Tags] gfal-utils [Setup] Use default voms proxy ${filename} Create local file ${surl} Build surl ${DEFAULT_SA} ${TESTDIR}/${filename} - Check file does not exists using lcg-utils ${surl} - Copy-out file using lcg-utils ${filename} ${surl} - Copy-in file using lcg-utils ${surl} ${filename}_copied + Check surl does not exists using gfal-utils ${surl} + Copy-out file using gfal-utils ${filename} ${surl} + Copy-in file using gfal-utils ${surl} ${filename}_copied Execute and check success diff /tmp/${TESTDIR}/${filename} /tmp/${TESTDIR}/${filename}_copied [Teardown] Clear all credentials diff --git a/tests/srm/mixedtests.robot b/tests/srm/mixedtests.robot index 70cf184..6bd22fd 100644 --- a/tests/srm/mixedtests.robot +++ b/tests/srm/mixedtests.robot @@ -22,8 +22,8 @@ Create file with synch ptp and pd [Arguments] ${surl} ${output} Perform pd using clientSRM ${surl} ${token} Should Contain ${output} SRM_SUCCESS -Upload file with lcg utils [Arguments] ${localfilename} ${surl} - Copy-out file using lcg-utils ${localfilename} ${surl} +Upload file with gfal utils [Arguments] ${localfilename} ${surl} + Copy-out file using gfal-utils ${localfilename} ${surl} Upload file with asynch ptp and globus file transfer [Arguments] ${surl} ${localfilename} ${turl} ${output} ${token} Perform ptp using clientSRM ${surl} @@ -64,7 +64,7 @@ Release file [Arguments] ${surl} ${token} Should Contain ${output} SRM_SUCCESS Copy file [Arguments] ${srcsurl} ${destsurl} - Copy file using lcg-utils ${srcSurl} ${destSurl} + Copy file using gfal-utils ${srcSurl} ${destSurl} Move file [Arguments] ${srcsurl} ${destsurl} ${output} Perform mv using clientSRM ${srcsurl} ${destsurl} @@ -91,7 +91,7 @@ Mixed tests [Arguments] ${storageArea} ${storageAreaRealRoot} ${turlFile3} Build gsiftp TURL ${storageAreaRealRoot} ${TESTDIR}/${dirname}/${filename}_3 Create remote directory ${surlDir} Create file with synch ptp and pd ${surlFile1} - Upload file with lcg utils ${filename} ${surlFile2} + Upload file with gfal utils ${filename} ${surlFile2} Upload file with asynch ptp and globus file transfer ${surlFile3} ${filename} ${turlFile3} Get file with synch ptg and globus file transfer ${surlFile3} ${turlFile3} Get file with asynch ptg and globus file transfer ${surlFile3} ${turlFile3} diff --git a/tests/srm/space_management/space_management.robot b/tests/srm/space_management/space_management.robot index 1f9f5d5..fdacf24 100644 --- a/tests/srm/space_management/space_management.robot +++ b/tests/srm/space_management/space_management.robot @@ -6,7 +6,7 @@ Resource lib/import.robot Space token used space is update [Documentation] Regression test for https://storm.cnaf.infn.it:8443/redmine/issues/109. Given a Space Token ST and a SURL that resides on ST pointing to a not existent file, verify that inspecting the unused space of the ST before and after a non-empty file has been stored on the SURL, the ST used space value is updated accordingly to the size of the new file. - [Tags] storm-client lcg-utils gst regression + [Tags] storm-client gfal-utils gst regression [Setup] Use default voms proxy ${token} Get SA Token Log ${token} @@ -14,7 +14,7 @@ Space token used space is update Log ${size_before} ${filename} Create local file ${surl} Build surl ${DEFAULT_SA} ${TESTDIR}/${filename} - Copy-out file using lcg-utils ${filename} ${surl} + Copy-out file using gfal-utils ${filename} ${surl} ${size_after} Get unused size using clientSRM ${token} Log ${size_after} ${diff_size} Run echo `expr ${size_before} - ${size_after}` @@ -43,4 +43,4 @@ Check a GetSpaceMetadata succedes when using a proxy without voms extensions ${spacetoken} Get space token using clientSRM ${token} ${output} Get space metadata using clientSRM ${spacetoken} Should Contain ${output} SRM_SUCCESS - [Teardown] Clear all credentials \ No newline at end of file + [Teardown] Clear all credentials diff --git a/tests/srm/space_management/used_space_info.robot b/tests/srm/space_management/used_space_info.robot index 2d04d99..88fcfc7 100644 --- a/tests/srm/space_management/used_space_info.robot +++ b/tests/srm/space_management/used_space_info.robot @@ -14,10 +14,10 @@ Check db size update after srmPutDone [Setup] Use default voms proxy ${filename} Create local file ${surl} Build surl ${DEFAULT_SA} ${TESTDIR}/${filename} - Check file does not exists using lcg-utils ${surl} + Check surl does not exists using gfal-utils ${surl} ${token} Get SA Token ${free_space_before} Get SA status info parameter ${token} free-space - Copy-out file using lcg-utils ${filename} ${surl} + Copy-out file using gfal-utils ${filename} ${surl} ${free_space_after} Get SA status info parameter ${token} free-space Should not be equal ${free_space_before} ${free_space_after} ${output} Perform rm using clientSRM ${surl} @@ -32,10 +32,10 @@ Check db size update after srmRm [Setup] Use default voms proxy ${filename} Create local file ${surl} Build surl ${DEFAULT_SA} ${TESTDIR}/${filename} - Check file does not exists using lcg-utils ${surl} + Check surl does not exists using gfal-utils ${surl} ${token} Get SA Token ${free_space} Get SA status info parameter ${token} free-space - Copy-out file using lcg-utils ${filename} ${surl} + Copy-out file using gfal-utils ${filename} ${surl} ${free_space_before} Get SA status info parameter ${token} free-space ${output} Perform rm using clientSRM ${surl} Should Contain ${output} SRM_SUCCESS @@ -75,9 +75,9 @@ Check db size update after a recursive srmRmdir ${free_space_2} Get SA status info parameter ${token} free-space ${filename} Create local file ${fsurl} Build surl ${DEFAULT_SA} ${TESTDIR}/${dirname}/${filename} - Check file does not exists using lcg-utils ${fsurl} - Copy-out file using lcg-utils ${filename} ${fsurl} - Check file exists using lcg-utils ${fsurl} + Check surl does not exists using gfal-utils ${fsurl} + Copy-out file using gfal-utils ${filename} ${fsurl} + Check surl exists using gfal-utils ${fsurl} ${free_space_3} Get SA status info parameter ${token} free-space ${output} Perform rmdir using clientSRM ${dsurl} -r ${free_space_4} Get SA status info parameter ${token} free-space diff --git a/tests/srm/tests.robot b/tests/srm/tests.robot index 6440746..81b4973 100644 --- a/tests/srm/tests.robot +++ b/tests/srm/tests.robot @@ -9,14 +9,14 @@ Check if StoRM publishes correctly values for used and free space on the BDII [Setup] Use default voms proxy ${filename} Create local file ${surl} Build surl ${DEFAULT_SA} ${TESTDIR}/${filename} - Check file does not exists using lcg-utils ${surl} - Copy-out file using lcg-utils ${filename} ${surl} + Check surl does not exists using gfal-utils ${surl} + Copy-out file using gfal-utils ${filename} ${surl} ${saToken} Get SA Token ${size_before} Get unused size using clientSRM ${saToken} Log ${size_before} - Check file exists using lcg-utils ${surl} + Check surl exists using gfal-utils ${surl} Perform rm using clientSRM ${surl} - Check file does not exists using lcg-utils ${surl} + Check surl does not exists using gfal-utils ${surl} ${size_after} Get unused size using clientSRM ${saToken} Log ${size_after} ${diff_size} Run echo `expr ${size_after} - ${size_before}` From a60a7236af0604dde344efebf1897878cb65476f Mon Sep 17 00:00:00 2001 From: enricovianello Date: Mon, 24 Dec 2018 19:32:51 +0100 Subject: [PATCH 8/9] Use docker registry centos7 storm-testsuite image --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 28e1570..69a18b4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -31,7 +31,7 @@ pipeline { usernamePassword(credentialsId: 'a5ca708a-eca8-4fc0-83cd-eb3695f083a1', passwordVariable: 'IAM_USER_PASSWORD', usernameVariable: 'IAM_USER_NAME') ]) { - def image = "${env.DOCKER_REGISTRY_HOST}/italiangrid/storm-testsuite:latest" + def image = "${env.DOCKER_REGISTRY_HOST}/italiangrid/storm-testsuite:centos7" echo "image: ${image}" sh "docker pull ${image}" From 2e0ad0a558b45aadd8649e2ca88705433200fd97 Mon Sep 17 00:00:00 2001 From: enricovianello Date: Mon, 7 Jan 2019 10:12:00 +0100 Subject: [PATCH 9/9] docker image as parameter --- Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 69a18b4..07c05c9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -19,6 +19,7 @@ pipeline { string(defaultValue: "to-be-fixed", description: '', name: 'TESTSUITE_EXCLUDE') string(defaultValue: "tests", description: '', name: 'TESTSUITE_SUITE') string(defaultValue: "/storage", description: '', name: 'STORM_STORAGE_ROOT_DIR') + string(defaultValue: "${env.DOCKER_REGISTRY_HOST}/italiangrid/storm-testsuite:centos7", description: '', name: 'STORM_TESTSUITE_IMAGE') } stages { @@ -31,7 +32,7 @@ pipeline { usernamePassword(credentialsId: 'a5ca708a-eca8-4fc0-83cd-eb3695f083a1', passwordVariable: 'IAM_USER_PASSWORD', usernameVariable: 'IAM_USER_NAME') ]) { - def image = "${env.DOCKER_REGISTRY_HOST}/italiangrid/storm-testsuite:centos7" + def image = "${params.STORM_TESTSUITE_IMAGE}" echo "image: ${image}" sh "docker pull ${image}"