This is an automated email from the ASF dual-hosted git repository. squakez pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 12135d4cf4efe1e365ff56cd7c5aa060624109aa Author: dydydd <[email protected]> AuthorDate: Wed Sep 16 22:37:02 2026 +0800 test: verify Knative Service monitor labels for #6804 --- pkg/trait/knative_service_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/trait/knative_service_test.go b/pkg/trait/knative_service_test.go index 59fd924c9..5451ea829 100644 --- a/pkg/trait/knative_service_test.go +++ b/pkg/trait/knative_service_test.go @@ -49,6 +49,7 @@ const ( ) func TestKnativeService(t *testing.T) { + t.Setenv(kubernetes.CamelMonitorOperatorLabelEnvVar, "my-dashboard-label") catalog, err := camel.DefaultCatalog() require.NoError(t, err) @@ -125,6 +126,9 @@ func TestKnativeService(t *testing.T) { }) assert.NotNil(t, s) + assert.Equal(t, KnativeServiceTestName, s.Labels["my-dashboard-label"]) + assert.Equal(t, KnativeServiceTestName, s.Spec.ConfigurationSpec.Template.ObjectMeta.Labels["my-dashboard-label"]) + assert.Equal(t, KnativeServiceTestName, s.Spec.ConfigurationSpec.Template.ObjectMeta.Labels[v1.IntegrationLabel]) spec := s.Spec.ConfigurationSpec.Template.Spec
