Skip to content

Commit

Permalink
Drop unused test scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
dmandalidis committed Aug 4, 2024
1 parent 4ba20a6 commit 3e3486a
Showing 1 changed file with 0 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1729,35 +1729,6 @@ private EventStream getImageAndContainerEventStream(final EventsParam... eventsP
return sut.events(eventsParamsWithTypes);
}

@Test
public void testEventFiltersWithSpaces() throws Exception {
sut.pull(BUSYBOX_LATEST);
final String containerName = randomName();
final ContainerConfig config = ContainerConfig.builder()
.image(BUSYBOX_LATEST)
.cmd("sleep", "5")
// Generate some healthy_status events
.healthcheck(Healthcheck.create(unmodifiableList(asList("CMD-SHELL", "true")),
1000000000L, 1000000000L, 3, 1000000000L))
.build();

final long startTime = new Date().getTime() / 1000;
final ContainerCreation container = sut.createContainer(config, containerName);
final String containerId = container.id();
sut.startContainer(containerId);
sut.waitContainer(containerId);
sut.removeContainer(containerId);
final long endTime = new Date().getTime() / 1000;

try (final EventStream stream = sut.events(since(startTime), until(endTime),
EventsParam.event("health_status: healthy")
)) {
assertTrue("Docker did not return any container events.", stream.hasNext());
containerEventAssertions(stream.next(), containerId, containerName,
"health_status: healthy", BUSYBOX_LATEST);
}
}

private void imageEventAssertions(final Event event,
final String imageName,
final String action) throws Exception {
Expand Down

0 comments on commit 3e3486a

Please sign in to comment.