@@ -132,6 +132,51 @@ os::cmd::expect_success "docker pull ${DOCKER_REGISTRY}/cache/mysql:pullthrough"
132
132
echo " [INFO] Docker start with GCS"
133
133
os::cmd::expect_failure_and_text " docker run -e REGISTRY_STORAGE=\" gcs: {}\" openshift/origin-docker-registry:${TAG} " " No bucket parameter provided"
134
134
135
+ # verify we can pull from tagged image (using tag)
136
+ imageid=$( docker images | grep centos/ruby-22-centos7 | awk ' { print $3 }' )
137
+ os::cmd::expect_success " docker rmi -f ${imageid} "
138
+ echo " [INFO] Tagging ruby-22-centos7:latest to the same image stream and pulling it"
139
+ os::cmd::expect_success " oc tag ruby-22-centos7:latest ruby-22-centos7:new-tag"
140
+ os::cmd::expect_success " docker pull ${DOCKER_REGISTRY} /cache/ruby-22-centos7:new-tag"
141
+ echo " [INFO] The same image stream pull successful"
142
+
143
+ imageid=$( docker images | grep cache/ruby-22-centos7 | awk ' { print $3 }' )
144
+ os::cmd::expect_success " docker rmi -f ${imageid} "
145
+ echo " [INFO] Tagging ruby-22-centos7:latest to cross repository and pulling it"
146
+ os::cmd::expect_success " oc tag ruby-22-centos7:latest cross:repo-pull"
147
+ os::cmd::expect_success " docker pull ${DOCKER_REGISTRY} /cache/cross:repo-pull"
148
+ echo " [INFO] Cross repository pull successful"
149
+
150
+ imageid=$( docker images | grep cache/cross | awk ' { print $3 }' )
151
+ os::cmd::expect_success " docker rmi -f ${imageid} "
152
+ echo " [INFO] Tagging ruby-22-centos7:latest to cross namespace and pulling it"
153
+ os::cmd::expect_success " oc tag cache/ruby-22-centos7:latest cross:namespace-pull -n custom"
154
+ os::cmd::expect_success " docker pull ${DOCKER_REGISTRY} /custom/cross:namespace-pull"
155
+ echo " [INFO] Cross namespace pull successful"
156
+
157
+ # verify we can pull from tagged image (using imageid)
158
+ imageid=$( docker images | grep custom/cross | awk ' { print $3 }' )
159
+ os::cmd::expect_success " docker rmi -f ${imageid} "
160
+ tagid=$( oc get istag ruby-22-centos7:latest --template={{.image.metadata.name}})
161
+ echo " [INFO] Tagging ruby-22-centos7@${tagid} to the same image stream and pulling it"
162
+ os::cmd::expect_success " oc tag ruby-22-centos7@${tagid} ruby-22-centos7:new-id-tag"
163
+ os::cmd::expect_success " docker pull ${DOCKER_REGISTRY} /cache/ruby-22-centos7:new-id-tag"
164
+ echo " [INFO] The same image stream pull successful"
165
+
166
+ imageid=$( docker images | grep cache/ruby-22-centos7 | awk ' { print $3 }' )
167
+ os::cmd::expect_success " docker rmi -f ${imageid} "
168
+ echo " [INFO] Tagging ruby-22-centos7@${tagid} to cross repository and pulling it"
169
+ os::cmd::expect_success " oc tag ruby-22-centos7@${tagid} cross:repo-pull-id"
170
+ os::cmd::expect_success " docker pull ${DOCKER_REGISTRY} /cache/cross:repo-pull-id"
171
+ echo " [INFO] Cross repository pull successful"
172
+
173
+ imageid=$( docker images | grep cache/cross | awk ' { print $3 }' )
174
+ os::cmd::expect_success " docker rmi -f ${imageid} "
175
+ echo " [INFO] Tagging ruby-22-centos7@${tagid} to cross namespace and pulling it"
176
+ os::cmd::expect_success " oc tag cache/ruby-22-centos7@${tagid} cross:namespace-pull-id -n custom"
177
+ os::cmd::expect_success " docker pull ${DOCKER_REGISTRY} /custom/cross:namespace-pull-id"
178
+ echo " [INFO] Cross namespace pull successful"
179
+
135
180
# check to make sure an image-pusher can push an image
136
181
os::cmd::expect_success ' oc policy add-role-to-user system:image-pusher pusher'
137
182
os::cmd::expect_success ' oc login -u pusher -p pass'
0 commit comments