fix: test agent config flake
@@ -152,7 +152,15 @@ def test_agent_config_path() -> None:
with open(etc_path) as f:
assert f.read() == out.decode("utf-8")
- client.containers.get("test-fluent") # Ensure config actually took effect.
+ for _ in range(10):
+ try:
+ client.containers.get("test-fluent")
+ break
+ except docker.errors.NotFound:
+ print("Waiting for 'test-fluent' container to be created")
+ time.sleep(10)
+ else:
+ pytest.fail("uh-oh, fluent didn't come online")
agent_down(["--agent-name", agent_name])
# Validate CLI flags overwrite config file options.
