add tests for image labels
@@ -218,6 +218,11 @@ os::cmd::expect_success_and_text "oc get is/mysql --template='{{(index .spec.tag
os::cmd::expect_failure_and_text 'oc tag mysql:latest tagtest:tag1 --alias' 'cannot set alias across'
+# label image
+imgsha256=$(oc get istag/mysql:latest --template='{{ .image.metadata.name }}')
+os::cmd::expect_success "oc label image ${imgsha256} foo=bar"
+os::cmd::expect_success_and_text "oc get image ${imgsha256} --show-labels" 'foo=bar'
+
# tag labeled image
os::cmd::expect_success 'oc label is/mysql labelA=value'
os::cmd::expect_success 'oc tag mysql:latest mysql:labeled'
