diff --git a/test/e2e/service_export_test.go b/test/e2e/service_export_test.go index 7725a84754..d9901e761b 100644 --- a/test/e2e/service_export_test.go +++ b/test/e2e/service_export_test.go @@ -55,11 +55,16 @@ func TestServiceExport(t *testing.T) { t.Log("create service with byo revision") serviceCreateWithOptions(r, "hello", "--revision-name", "rev1") + userImage := pkgtest.ImagePath("helloworld") + if strings.Contains(userImage, "@") { + // Images specified by digest are not set in user-image annotation. + userImage = "" + } t.Log("export service-revision1 and compare") serviceExport(r, "hello", test.BuildServiceWithOptions("hello", servingtest.WithConfigSpec(test.BuildConfigurationSpec()), servingtest.WithBYORevisionName("hello-rev1"), - test.WithRevisionAnnotations(map[string]string{"client.knative.dev/user-image": pkgtest.ImagePath("helloworld")}), + test.WithRevisionAnnotations(map[string]string{"client.knative.dev/user-image": userImage}), ), "--mode", "replay", "-o", "json") t.Log("update service - add env variable") @@ -97,7 +102,7 @@ func TestServiceExport(t *testing.T) { servingtest.WithConfigSpec(test.BuildConfigurationSpec()), servingtest.WithBYORevisionName("hello-rev1"), test.WithRevisionAnnotations(map[string]string{ - "client.knative.dev/user-image": pkgtest.ImagePath("helloworld"), + "client.knative.dev/user-image": userImage, "serving.knative.dev/routes": "hello", }), )), @@ -117,7 +122,7 @@ func TestServiceExport(t *testing.T) { servingtest.WithEnv(corev1.EnvVar{Name: "a", Value: "mouse"}), ), test.BuildKNExportWithOptions( test.WithKNRevision(*(test.BuildRevision("hello-rev1", - servingtest.WithRevisionAnn("client.knative.dev/user-image", pkgtest.ImagePath("helloworld")), + servingtest.WithRevisionAnn("client.knative.dev/user-image", userImage), servingtest.WithRevisionAnn("serving.knative.dev/routes", "hello"), servingtest.WithRevisionLabel("serving.knative.dev/configuration", "hello"), servingtest.WithRevisionLabel("serving.knative.dev/configurationGeneration", "1"), @@ -136,7 +141,7 @@ func TestServiceExport(t *testing.T) { test.WithService(test.BuildServiceWithOptions("hello", servingtest.WithConfigSpec(test.BuildConfigurationSpec()), test.WithRevisionAnnotations(map[string]string{ - "client.knative.dev/user-image": pkgtest.ImagePath("helloworld"), + "client.knative.dev/user-image": userImage, "serving.knative.dev/routes": "hello", }), servingtest.WithBYORevisionName("hello-rev1"), @@ -167,7 +172,7 @@ func TestServiceExport(t *testing.T) { servingtest.WithEnv(corev1.EnvVar{Name: "a", Value: "mouse"}, corev1.EnvVar{Name: "b", Value: "cat"}), ), test.BuildKNExportWithOptions( test.WithKNRevision(*(test.BuildRevision("hello-rev1", - servingtest.WithRevisionAnn("client.knative.dev/user-image", pkgtest.ImagePath("helloworld")), + servingtest.WithRevisionAnn("client.knative.dev/user-image", userImage), servingtest.WithRevisionAnn("serving.knative.dev/routes", "hello"), servingtest.WithRevisionLabel("serving.knative.dev/configuration", "hello"), servingtest.WithRevisionLabel("serving.knative.dev/configurationGeneration", "1"), diff --git a/test/e2e/source_container_test.go b/test/e2e/source_container_test.go index 7c98035e7c..5481486133 100644 --- a/test/e2e/source_container_test.go +++ b/test/e2e/source_container_test.go @@ -81,7 +81,7 @@ func containerSourceList(r *test.KnRunResultCollector, containerSources ...strin r.AssertNoError(out) assert.Check(r.T(), util.ContainsAll(out.Stdout, "NAME", "IMAGE", "SINK", "READY")) assert.Check(r.T(), util.ContainsAll(out.Stdout, containerSources...)) - assert.Check(r.T(), util.ContainsAll(out.Stdout, "grpc-ping", "ksvc:testsvc0")) + assert.Check(r.T(), util.ContainsAll(out.Stdout, "ksvc:testsvc0")) } func containerSourceCreateMissingSink(r *test.KnRunResultCollector, sourceName string, sink string) {