Admins will be upgrading ORNL GitLab Servers on Saturday, 16 May 2026, from 7 AM until 11 AM EST. Repositories will experience intermittent outages during this time.
assert "Hello" in ${backend}.succeed("cat /tmp/result"), "no greeting in output"
# Test attach: uses host tools in container's network namespace
# Curl localhost to verify we're in the container's network
result = ${backend}.succeed("cntr attach -t ${backend} nginx curl -s localhost")
assert "Hello" in result, f"no greeting in output: {result}"
# Test exec: runs in container's native filesystem
# Use nginx's own binary to verify exec works
result = ${backend}.succeed("cntr exec -t ${backend} nginx -- nginx -v")
assert "nginx" in result, f"expected nginx version: {result}"
'';
};
@@ -60,20 +59,23 @@ let
privateNetwork=true;
hostAddress="172.16.0.1";
localAddress="172.16.0.2";
config={};
config=
{pkgs,...}:
{
environment.systemPackages=[pkgs.iputils];
};
};
};
testScript=''
machine.start()
machine.wait_for_unit("container@test.service")
# I haven't observed the same hanging behaviour in this version as in the OCI version which necessetates this messy invocation, but it's probably better to be safe than sorry and use it here as well
machine.execute(
"(cntr attach test sh -- -c 'ping -c5 172.16.0.1'; echo $? > /tmp/exitcode; touch /tmp/done) &"