diff --git a/nix/vm-tests/full-setup.py b/nix/vm-tests/full-setup.py index 7d305a368..cea42e501 100644 --- a/nix/vm-tests/full-setup.py +++ b/nix/vm-tests/full-setup.py @@ -257,9 +257,11 @@ with subtest("step 9: the first agent"): create_agent({"name": "iris", "hive": HIVE, "archetype": ARCHETYPE}) with subtest("internal/meta holds the flake the toplevels were built from"): + # The controller commits the flake after it accepts a create, so the file can exist + # holding only the earlier agents; wait for the last one created. settle( f"curl --fail --silent --insecure -H @{FORGE_AUTH} {FORGE}/api/v1/repos/internal/meta/raw/flake.nix " - ">/root/meta-flake.nix", + ">/root/meta-flake.nix && grep -qF 'iris = mkAgent' /root/meta-flake.nix", 1800, "swarm-controller", )