Skip to content

Commit 2e05d26

Browse files
Merge pull request #20687 from gabemontero/imp-img-e2e-flake
in e2e wait for istag creation after the import, before the pull
2 parents b250f4f + a0988c7 commit 2e05d26

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/end-to-end/core.sh

+3
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ os::log::info "Ruby's testing blob digest: ${rubyimageblob}"
173173
# verify remote images can be pulled directly from the local registry
174174
os::log::info "Docker pullthrough"
175175
os::cmd::expect_success "oc import-image --confirm --from=mysql:latest mysql:pullthrough"
176+
os::cmd::try_until_success 'oc get imagestreamtags mysql:pullthrough' $((2*TIME_MIN))
176177
os::cmd::expect_success "docker pull ${DOCKER_REGISTRY}/cache/mysql:pullthrough"
177178
mysqlblob="$(oc get istag -o go-template='{{range .image.dockerImageLayers}}{{if gt .size 4096.}}{{.name}},{{end}}{{end}}' "mysql:pullthrough" | cut -d , -f 1)"
178179
# directly hit the image to trigger mirroring in case the layer already exists on disk
@@ -213,6 +214,7 @@ os::cmd::expect_failure_and_text "docker run -e OPENSHIFT_DEFAULT_REGISTRY=local
213214

214215
os::log::info "Docker pull from istag"
215216
os::cmd::expect_success "oc import-image --confirm --from=hello-world:latest -n test hello-world:pullthrough"
217+
os::cmd::try_until_success 'oc get imagestreamtags hello-world:pullthrough -n test' $((2*TIME_MIN))
216218
os::cmd::expect_success "docker pull ${DOCKER_REGISTRY}/test/hello-world:pullthrough"
217219
os::cmd::expect_success "docker tag ${DOCKER_REGISTRY}/test/hello-world:pullthrough ${DOCKER_REGISTRY}/cache/hello-world:latest"
218220
os::cmd::expect_success "docker push ${DOCKER_REGISTRY}/cache/hello-world:latest"
@@ -275,6 +277,7 @@ os::test::junit::declare_suite_end
275277

276278
os::log::info "Fetch manifest V2 schema 2 image with old client using pullthrough"
277279
os::cmd::expect_success "oc import-image --confirm --from=hello-world:latest hello-world:pullthrough"
280+
os::cmd::try_until_success 'oc get imagestreamtags hello-world:pullthrough' $((2*TIME_MIN))
278281
os::cmd::expect_success_and_text "oc get -o jsonpath='{.image.dockerImageManifestMediaType}' istag hello-world:pullthrough" 'application/vnd\.docker\.distribution\.manifest\.v2\+json'
279282
hello_world_name="$(oc get -o 'jsonpath={.image.metadata.name}' istag hello-world:pullthrough)"
280283
os::cmd::expect_success_and_text "echo '${hello_world_name}'" '.+'

0 commit comments

Comments
 (0)