Skip to content

Commit

Permalink
Increasing sleep time to resolve verbose=false issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Senjuti256 authored and openshift-merge-bot[bot] committed Aug 2, 2024
1 parent 947d5c0 commit c6526ad
Showing 1 changed file with 38 additions and 2 deletions.
40 changes: 38 additions & 2 deletions test/e2e/e2e-skopeo-copy.bats
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ source ./test/helper/helper.sh
declare -rx E2E_SC_PARAMS_SOURCE_IMAGE_URL="${E2E_SC_PARAMS_SOURCE_IMAGE_URL:-}"
declare -rx E2E_SC_PARAMS_DESTINATION_IMAGE_URL="${E2E_SC_PARAMS_DESTINATION_IMAGE_URL:-}"

# Testing the skopeo-copy task,
@test "[e2e] skopeo-copy task copying a image from source to destination registry" {
# Testing the skopeo-copy task, verbose = true
@test "[e2e] skopeo-copy task copying a image from source to destination registry with verbose set to true" {
# asserting all required configuration is informed
[ -n "${E2E_SC_PARAMS_SOURCE_IMAGE_URL}" ]
[ -n "${E2E_SC_PARAMS_DESTINATION_IMAGE_URL}" ]
Expand Down Expand Up @@ -40,3 +40,39 @@ declare -rx E2E_SC_PARAMS_DESTINATION_IMAGE_URL="${E2E_SC_PARAMS_DESTINATION_IMA
# asserting the latest taskrun instacne to inspect the resources against a regular expression
assert_tekton_resource "taskrun" --regexp $'\S+\n?DESTINATION_DIGEST=\S+\nSOURCE_DIGEST=\S+'
}

# Testing the skopeo-copy task, verbose = false
@test "[e2e] skopeo-copy task copying a image from source to destination registry with verbose set to false" {
# asserting all required configuration is informed
[ -n "${E2E_SC_PARAMS_SOURCE_IMAGE_URL}" ]
[ -n "${E2E_SC_PARAMS_DESTINATION_IMAGE_URL}" ]
[ -n "${E2E_PARAMS_SRC_TLS_VERIFY}" ]
[ -n "${E2E_PARAMS_DEST_TLS_VERIFY}" ]

# cleaning up all the existing resources before starting a new taskrun, the test assertion
# will describe the objects on the current namespace
run kubectl delete taskrun --all
assert_success

#
# E2E TaskRun
#

run tkn task start skopeo-copy \
--param="SOURCE_IMAGE_URL=${E2E_SC_PARAMS_SOURCE_IMAGE_URL}" \
--param="DESTINATION_IMAGE_URL=${E2E_SC_PARAMS_DESTINATION_IMAGE_URL}" \
--param="SRC_TLS_VERIFY=${E2E_PARAMS_SRC_TLS_VERIFY}" \
--param="DEST_TLS_VERIFY=${E2E_PARAMS_DEST_TLS_VERIFY}" \
--param="VERBOSE=false" \
--workspace name=images_url,volumeClaimTemplateFile=./test/e2e/resources/workspace-template.yaml \
--showlog
assert_success

# waiting a few seconds before asserting results
sleep 100

# assering the taskrun status, making sure all steps have been successful
assert_tekton_resource "taskrun" --partial 'All Steps have completed executing'
# asserting the latest taskrun instacne to inspect the resources against a regular expression
assert_tekton_resource "taskrun" --regexp $'\S+\n?DESTINATION_DIGEST=\S+\nSOURCE_DIGEST=\S+'
}

0 comments on commit c6526ad

Please sign in to comment.