diff --git a/test/integration/corechecks/docker/basemetrics_test.go b/test/integration/corechecks/docker/basemetrics_test.go index 27a473a3eb201..dd03749d5d065 100644 --- a/test/integration/corechecks/docker/basemetrics_test.go +++ b/test/integration/corechecks/docker/basemetrics_test.go @@ -17,6 +17,7 @@ func init() { func TestContainerMetricsTagging(t *testing.T) { expectedTags := []string{ + instanceTag, // Instance tags "container_name:basemetrics_redis_1", // Container name "docker_image:datadog/docker-library:redis_3_2_11-alpine", "image_name:datadog/docker-library", @@ -49,6 +50,7 @@ func TestContainerMetricsTagging(t *testing.T) { }, } pauseTags := []string{ + "instanceTag:MustBeHere", "docker_image:kubernetes/pause:latest", "image_name:kubernetes/pause", "image_tag:latest", diff --git a/test/integration/corechecks/docker/events_test.go b/test/integration/corechecks/docker/events_test.go index 1921194347fe0..8168a3f621513 100644 --- a/test/integration/corechecks/docker/events_test.go +++ b/test/integration/corechecks/docker/events_test.go @@ -22,6 +22,7 @@ func init() { func TestEvents(t *testing.T) { nowTimestamp := time.Now().Unix() expectedTags := []string{ + instanceTag, "highcardlabeltag:eventhigh", "lowcardlabeltag:eventlow", "highcardenvtag:eventhighenv", diff --git a/test/integration/corechecks/docker/exitcode_test.go b/test/integration/corechecks/docker/exitcode_test.go index a07f8ad7161c4..87b4bc0609456 100644 --- a/test/integration/corechecks/docker/exitcode_test.go +++ b/test/integration/corechecks/docker/exitcode_test.go @@ -17,6 +17,7 @@ func init() { func TestContainerExit(t *testing.T) { expectedTags := []string{ + instanceTag, "docker_image:datadog/docker-library:busybox_1_28_0", "image_name:datadog/docker-library", "short_image:docker-library", diff --git a/test/integration/corechecks/docker/globalmetrics_test.go b/test/integration/corechecks/docker/globalmetrics_test.go index 6cbb016788294..ffc04ecdd3b78 100644 --- a/test/integration/corechecks/docker/globalmetrics_test.go +++ b/test/integration/corechecks/docker/globalmetrics_test.go @@ -16,7 +16,7 @@ func init() { } func TestGlobalMetrics(t *testing.T) { - expectedTags := []string{} + expectedTags := []string{instanceTag} sender.AssertCalled(t, "Gauge", "docker.images.available", mocksender.IsGreaterOrEqual(2), "", mocksender.MatchTagsContains(expectedTags)) sender.AssertCalled(t, "Gauge", "docker.images.intermediate", mocksender.IsGreaterOrEqual(0), "", mocksender.MatchTagsContains(expectedTags)) diff --git a/test/integration/corechecks/docker/main_test.go b/test/integration/corechecks/docker/main_test.go index 096777f868acb..a317b82de07df 100644 --- a/test/integration/corechecks/docker/main_test.go +++ b/test/integration/corechecks/docker/main_test.go @@ -26,6 +26,9 @@ var retryDelay = flag.Int("retry-delay", 1, "time to wait between retries (defau var retryTimeout = flag.Int("retry-timeout", 30, "maximum time before failure (default 30 seconds)") var skipCleanup = flag.Bool("skip-cleanup", false, "skip cleanup of the docker containers (for debugging)") +// Must be repeated in the following dockerCfgString +const instanceTag = "instanceTag:MustBeHere" + var dockerCfgString = ` collect_events: true collect_container_size: true diff --git a/test/integration/corechecks/docker/serviceup_test.go b/test/integration/corechecks/docker/serviceup_test.go index 1a6b11caa37e8..79a04411a0a92 100644 --- a/test/integration/corechecks/docker/serviceup_test.go +++ b/test/integration/corechecks/docker/serviceup_test.go @@ -12,7 +12,9 @@ import ( ) func TestServiceUp(t *testing.T) { - expectedTags := []string{} + expectedTags := []string{ + instanceTag, + } sender.AssertServiceCheck(t, "docker.service_up", metrics.ServiceCheckOK, "", expectedTags, "") }