diff --git a/test/extended/builds/labels.go b/test/extended/builds/labels.go index af4daec5cf23..ac3d622e073f 100644 --- a/test/extended/builds/labels.go +++ b/test/extended/builds/labels.go @@ -113,6 +113,11 @@ func ExpectOpenShiftLabels(labels map[string]string) error { return fmt.Errorf("Built image doesn't contain proper Docker image labels. Missing %q label", label) } } - + if labels["io.k8s.display-name"] != "overridden" { + return fmt.Errorf("Existing label was not overridden with user specified value: %s=%s", labels["io.k8s.display-name"], labels["overridden"]) + } + if labels["io.openshift.builder-version"] != "overridden2" { + return fmt.Errorf("System generated label was not overridden with user specified value: %s=%s", labels["io.openshift.builder-version"], labels["overridden2"]) + } return nil } diff --git a/test/extended/testdata/bindata.go b/test/extended/testdata/bindata.go index b0596c609515..5073ca64f4ed 100644 --- a/test/extended/testdata/bindata.go +++ b/test/extended/testdata/bindata.go @@ -9324,6 +9324,14 @@ var _testExtendedTestdataTestDockerBuildJson = []byte(`{ { "name": "user-specified-label", "value": "arbitrary-value" + }, + { + "name": "io.k8s.display-name", + "value": "overridden" + }, + { + "name": "io.openshift.builder-version", + "value": "overridden2" } ] } @@ -10256,6 +10264,14 @@ var _testExtendedTestdataTestS2iBuildJson = []byte(`{ { "name": "user-specified-label", "value": "arbitrary-value" + }, + { + "name": "io.k8s.display-name", + "value": "overridden" + }, + { + "name": "io.openshift.builder-version", + "value": "overridden2" } ] } diff --git a/test/extended/testdata/test-docker-build.json b/test/extended/testdata/test-docker-build.json index 823f19603a16..aaadc2c16007 100644 --- a/test/extended/testdata/test-docker-build.json +++ b/test/extended/testdata/test-docker-build.json @@ -34,6 +34,14 @@ { "name": "user-specified-label", "value": "arbitrary-value" + }, + { + "name": "io.k8s.display-name", + "value": "overridden" + }, + { + "name": "io.openshift.builder-version", + "value": "overridden2" } ] } diff --git a/test/extended/testdata/test-s2i-build.json b/test/extended/testdata/test-s2i-build.json index 548f87c55d27..1834e16ae3d8 100644 --- a/test/extended/testdata/test-s2i-build.json +++ b/test/extended/testdata/test-s2i-build.json @@ -40,6 +40,14 @@ { "name": "user-specified-label", "value": "arbitrary-value" + }, + { + "name": "io.k8s.display-name", + "value": "overridden" + }, + { + "name": "io.openshift.builder-version", + "value": "overridden2" } ] }