integration-tests: Start migration to modular test framework

Still need to migrate most logic in tools.nix to modules.
This commit is contained in:
Zhaofeng Li 2022-12-01 01:57:56 -07:00
parent 92f0f155d4
commit 8b87f0de02
8 changed files with 280 additions and 190 deletions

View file

@ -2,16 +2,18 @@
let
tools = pkgs.callPackage ../tools.nix {};
in tools.makeTest {
in tools.runTest {
name = "colmena-exec";
bundle = ./.;
colmena.test = {
bundle = ./.;
testScript = ''
logs = deployer.succeed("cd /tmp/bundle && ${tools.colmenaExec} exec --on @target -- echo output from '$(hostname)' 2>&1")
testScript = ''
logs = deployer.succeed("cd /tmp/bundle && ${tools.colmenaExec} exec --on @target -- echo output from '$(hostname)' 2>&1")
assert "output from alpha" in logs
assert "output from beta" in logs
assert "output from gamma" in logs
'';
assert "output from alpha" in logs
assert "output from beta" in logs
assert "output from gamma" in logs
'';
};
}