File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -390,9 +390,10 @@ test_ada_stage_dir() {
390390}
391391
392392# Unstage a directory based on request_id
393+ # And get status of request_id
393394# Note: this function uses ${stdoutF} from previous function
394395# So do not overwrite in between
395- test_ada_unstage_dir_request_id () {
396+ test_ada_request_id () {
396397 request_url=` grep " request-url" " ${stdoutF} " | awk ' {print $2}' | tr -d ' \r' `
397398 request_id=$( basename " $request_url " )
398399 command=" ada/ada --tokenfile ${token_file} --unstage /${tape_path} /${dirname} /${dirfile} --request-id ${request_id} --api ${api} "
@@ -410,6 +411,17 @@ test_ada_unstage_dir_request_id() {
410411 # file should COMPLETED
411412 state=` curl -X GET " ${request_url} " -H " accept: application/json" -H " Authorization: Bearer $token " | jq -r ' .targets[1].state' `
412413 assertEquals " State of target:" " COMPLETED" $state
414+
415+ # Test status of request id, we do this in same test function because we need same request-id
416+ command=" ada/ada --tokenfile ${token_file} --stat-request ${request_id} --api ${api} "
417+ echo " Running command:"
418+ echo $command
419+ eval $command > ${stdoutF} 2> ${stderrF}
420+ result=$?
421+ assertEquals " ada returned error code ${result} " 0 ${result} || return
422+ uid=` cat " ${stdoutF} " | jq -r ' .uid' `
423+ echo $uid
424+ assertEquals ${uid} ${request_id}
413425}
414426
415427# Stages files in file_list
You can’t perform that action at this time.
0 commit comments