Browse code

integration-cli: TestEventsFilterType: remove test for "build" events

Commit 6aea8c2591d40c96d90a2da0a1d499799cdcabad updated this part of the
test to account for BuildKit now being used as default, which doesn't use
regular containers to "commit" to an image, and therefore doesn't produce
events as part of the build.

However, it changed it to filter for `build` type events, which .. don't
exist. The test passed because it only checked for number of events produced,
which is approximated by checking the number of lines in the output. In
this case, the output would be empty, so "events" was a slice of strings
with length 1; an empty string.

Given that BuildKit doesn't produce meaningful events to test for, we could
either disable BuildKit, to test the legacy builder, or just remove this
part of the test. Let's do the latter.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2025/12/10 09:50:45
Showing 1 changed files
... ...
@@ -587,18 +587,6 @@ func (s *DockerCLIEventSuite) TestEventsFilterType(c *testing.T) {
587 587
 		"events",
588 588
 		"--since", since,
589 589
 		"--until", daemonUnixTime(c),
590
-		"--filter", fmt.Sprintf("label=%s", label),
591
-		"--filter", "type=build",
592
-	).Stdout()
593
-	events = strings.Split(strings.TrimSpace(out), "\n")
594
-
595
-	// Events generated the build
596
-	assert.Equal(c, len(events), 1, "Events == %s", events)
597
-
598
-	out = cli.DockerCmd(c,
599
-		"events",
600
-		"--since", since,
601
-		"--until", daemonUnixTime(c),
602 590
 		"--filter", "type=network",
603 591
 	).Stdout()
604 592
 	events = strings.Split(strings.TrimSpace(out), "\n")