@@ -128,16 +128,15 @@ os::cmd::expect_success_and_text 'oc import-image mysql:latest' "sha256:"
128
128
os::cmd::expect_success_and_text ' oc import-image mysql:external --from=docker.io/mysql' " sha256:"
129
129
os::cmd::expect_success_and_text " oc get istag/mysql:external --template='{{.tag.from.kind}}'" ' DockerImage'
130
130
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'
132
131
# 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 '
137
136
# 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 }}' )
141
140
echo " import-image: ok"
142
141
os::test::junit::declare_suite_end
143
142
@@ -178,11 +177,11 @@ os::cmd::try_until_success 'oc get istag/mysql:5.5'
178
177
# default behavior is to copy the current image, but since this is an external image we preserve the dockerImageReference
179
178
os::cmd::expect_success ' oc tag mysql:5.5 newrepo:latest'
180
179
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:'
182
181
# aliases set the spec tag to be a reference to the originating stream
183
182
os::cmd::expect_success ' oc tag mysql:5.5 newrepo:latest --alias'
184
183
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:'
186
185
# when copying a tag that points to the internal registry, update the docker image reference
187
186
os::cmd::expect_success " oc tag test:new newrepo:direct"
188
187
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
197
196
os::cmd::expect_success ' oc new-project test-cmd-images-2'
198
197
os::cmd::expect_success " oc tag $project /mysql:5.5 newrepo:latest"
199
198
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:'
201
200
# tag accross projects without specifying the source's project
202
201
os::cmd::expect_success_and_text " oc tag newrepo:latest '${project} /mysql:tag1'" " mysql:tag1 set to"
203
202
os::cmd::expect_success_and_text " oc get is/newrepo --template='{{(index .spec.tags 0).name}}'" " latest"
0 commit comments