Skip to content

Commit 92a71d4

Browse files
author
OpenShift Bot
authored
Merge pull request #11393 from liggitt/fix-external-mysql-tests
Merged by openshift-bot
2 parents 8478d3c + eebbd5c commit 92a71d4

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

test/cmd/images_tests.sh

+10-11
Original file line numberDiff line numberDiff line change
@@ -128,16 +128,15 @@ os::cmd::expect_success_and_text 'oc import-image mysql:latest' "sha256:"
128128
os::cmd::expect_success_and_text 'oc import-image mysql:external --from=docker.io/mysql' "sha256:"
129129
os::cmd::expect_success_and_text "oc get istag/mysql:external --template='{{.tag.from.kind}}'" 'DockerImage'
130130
os::cmd::expect_success_and_text "oc get istag/mysql:external --template='{{.tag.from.name}}'" 'docker.io/mysql'
131-
os::cmd::expect_success 'oc delete is/mysql'
132131
# import creates new image stream with single tag
133-
os::cmd::expect_failure_and_text 'oc import-image mysql:latest --from=docker.io/mysql:latest' '\-\-confirm'
134-
os::cmd::expect_success_and_text 'oc import-image mysql:latest --from=docker.io/mysql:latest --confirm' 'sha256:'
135-
os::cmd::expect_success_and_text "oc get is/mysql --template='{{(len .spec.tags)}}'" '1'
136-
os::cmd::expect_success 'oc delete is/mysql'
132+
os::cmd::expect_failure_and_text 'oc import-image mysql-new-single:latest --from=docker.io/mysql:latest' '\-\-confirm'
133+
os::cmd::expect_success_and_text 'oc import-image mysql-new-single:latest --from=docker.io/mysql:latest --confirm' 'sha256:'
134+
os::cmd::expect_success_and_text "oc get is/mysql-new-single --template='{{(len .spec.tags)}}'" '1'
135+
os::cmd::expect_success 'oc delete is/mysql-new-single'
137136
# import creates new image stream with all tags
138-
os::cmd::expect_failure_and_text 'oc import-image mysql --from=mysql --all' '\-\-confirm'
139-
os::cmd::expect_success_and_text 'oc import-image mysql --from=mysql --all --confirm' 'sha256:'
140-
name=$(oc get istag/mysql:latest --template='{{ .image.metadata.name }}')
137+
os::cmd::expect_failure_and_text 'oc import-image mysql-new-all --from=mysql --all' '\-\-confirm'
138+
os::cmd::expect_success_and_text 'oc import-image mysql-new-all --from=mysql --all --confirm' 'sha256:'
139+
name=$(oc get istag/mysql-new-all:latest --template='{{ .image.metadata.name }}')
141140
echo "import-image: ok"
142141
os::test::junit::declare_suite_end
143142

@@ -178,11 +177,11 @@ os::cmd::try_until_success 'oc get istag/mysql:5.5'
178177
# default behavior is to copy the current image, but since this is an external image we preserve the dockerImageReference
179178
os::cmd::expect_success 'oc tag mysql:5.5 newrepo:latest'
180179
os::cmd::expect_success_and_text "oc get is/newrepo --template='{{(index .spec.tags 0).from.kind}}'" 'ImageStreamImage'
181-
os::cmd::expect_success_and_text "oc get is/newrepo --template='{{(index .status.tags 0 \"items\" 0).dockerImageReference}}'" '^mysql@sha256:'
180+
os::cmd::expect_success_and_text "oc get is/newrepo --template='{{(index .status.tags 0 \"items\" 0).dockerImageReference}}'" '^openshift/mysql-55-centos7@sha256:'
182181
# aliases set the spec tag to be a reference to the originating stream
183182
os::cmd::expect_success 'oc tag mysql:5.5 newrepo:latest --alias'
184183
os::cmd::expect_success_and_text "oc get is/newrepo --template='{{(index .spec.tags 0).from.kind}}'" 'ImageStreamTag'
185-
os::cmd::expect_success_and_text "oc get is/newrepo --template='{{(index .status.tags 0 \"items\" 0).dockerImageReference}}'" '^mysql@sha256:'
184+
os::cmd::expect_success_and_text "oc get is/newrepo --template='{{(index .status.tags 0 \"items\" 0).dockerImageReference}}'" '^openshift/mysql-55-centos7@sha256:'
186185
# when copying a tag that points to the internal registry, update the docker image reference
187186
os::cmd::expect_success "oc tag test:new newrepo:direct"
188187
os::cmd::expect_success_and_text 'oc get istag/newrepo:direct -o jsonpath={.image.dockerImageReference}' "/$project/newrepo@sha256:"
@@ -197,7 +196,7 @@ os::cmd::expect_success_and_text "oc get is/reference --template='{{(index .spec
197196
os::cmd::expect_success 'oc new-project test-cmd-images-2'
198197
os::cmd::expect_success "oc tag $project/mysql:5.5 newrepo:latest"
199198
os::cmd::expect_success_and_text "oc get is/newrepo --template='{{(index .spec.tags 0).from.kind}}'" 'ImageStreamImage'
200-
os::cmd::expect_success_and_text 'oc get istag/newrepo:latest -o jsonpath={.image.dockerImageReference}' 'mysql@sha256:'
199+
os::cmd::expect_success_and_text 'oc get istag/newrepo:latest -o jsonpath={.image.dockerImageReference}' 'openshift/mysql-55-centos7@sha256:'
201200
# tag accross projects without specifying the source's project
202201
os::cmd::expect_success_and_text "oc tag newrepo:latest '${project}/mysql:tag1'" "mysql:tag1 set to"
203202
os::cmd::expect_success_and_text "oc get is/newrepo --template='{{(index .spec.tags 0).name}}'" "latest"

0 commit comments

Comments
 (0)