Convert all tests to the Python DSL
[?]
May 11, 2020, 7:36 PM
Z3JVFE2RRONRR2MCEIK7JO3MJL4G2QJXZIHNRYMHDF6ULPN2PKAQCDependencies
Change contents
- replacement in flake.nix at line 178
with import (nixpkgs + "/nixos/lib/testing.nix") { system = "x86_64-linux"; };with import (nixpkgs + "/nixos/lib/testing-python.nix") { system = "x86_64-linux"; }; - replacement in flake.nix at line 183
$machine->waitForJob("hydra-init");$machine->waitForJob("hydra-server");$machine->waitForJob("hydra-evaluator");$machine->waitForJob("hydra-queue-runner");$machine->waitForOpenPort("3000");$machine->succeed("curl --fail http://localhost:3000/");machine.wait_for_job("hydra-init")machine.wait_for_job("hydra-server")machine.wait_for_job("hydra-evaluator")machine.wait_for_job("hydra-queue-runner")machine.wait_for_open_port("3000")machine.succeed("curl --fail http://localhost:3000/") - replacement in flake.nix at line 193
with import (nixpkgs + "/nixos/lib/testing.nix") { system = "x86_64-linux"; };with import (nixpkgs + "/nixos/lib/testing-python.nix") { system = "x86_64-linux"; }; - replacement in flake.nix at line 199
$machine->waitForJob("hydra-init");machine.wait_for_job("hydra-init") - replacement in flake.nix at line 202
$machine->succeed( "su - hydra -c \"hydra-create-user root --email-address 'alice\@example.org' --password foobar --role admin\"", "mkdir /run/jobset /tmp/nix", "chmod 755 /run/jobset /tmp/nix", "cp ${./tests/api-test.nix} /run/jobset/default.nix", "chmod 644 /run/jobset/default.nix", "chown -R hydra /run/jobset /tmp/nix");machine.succeed("""su - hydra -c "hydra-create-user root --email-address 'alice@example.org' --password foobar --role admin"mkdir /run/jobset /tmp/nixchmod 755 /run/jobset /tmp/nixcp ${./tests/api-test.nix} /run/jobset/default.nixchmod 644 /run/jobset/default.nixchown -R hydra /run/jobset /tmp/nix""") - replacement in flake.nix at line 213
$machine->succeed("systemctl stop hydra-evaluator hydra-queue-runner");$machine->waitForJob("hydra-server");$machine->waitForOpenPort("3000");machine.succeed("systemctl stop hydra-evaluator hydra-queue-runner")machine.wait_for_job("hydra-server")machine.wait_for_open_port("3000") - replacement in flake.nix at line 218
$machine->mustSucceed("su - hydra -c 'perl -I ${pkgs.hydra.perlDeps}/lib/perl5/site_perl ${./tests/api-test.pl}' >&2");machine.succeed("su - hydra -c 'perl -I ${pkgs.hydra.perlDeps}/lib/perl5/site_perl ${./tests/api-test.pl}' >&2") - replacement in flake.nix at line 225
with import (nixpkgs + "/nixos/lib/testing.nix") { system = "x86_64-linux"; };with import (nixpkgs + "/nixos/lib/testing-python.nix") { system = "x86_64-linux"; }; - replacement in flake.nix at line 238
$machine->waitForJob("hydra-init");machine.wait_for_job("hydra-init") - replacement in flake.nix at line 241
$machine->succeed( "su - hydra -c \"hydra-create-user root --email-address 'alice\@example.org' --password foobar --role admin\"", "mkdir /run/jobset", "chmod 755 /run/jobset", "cp ${./tests/api-test.nix} /run/jobset/default.nix", "chmod 644 /run/jobset/default.nix", "chown -R hydra /run/jobset");machine.succeed("""su - hydra -c "hydra-create-user root --email-address 'alice@example.org' --password foobar --role admin"mkdir /run/jobsetchmod 755 /run/jobsetcp ${./tests/api-test.nix} /run/jobset/default.nixchmod 644 /run/jobset/default.nixchown -R hydra /run/jobset""") - replacement in flake.nix at line 253
$machine->waitForJob("influxdb");$machine->waitForOpenPort("8086");machine.wait_for_job("influxdb")machine.wait_for_open_port("8086") - replacement in flake.nix at line 257
$machine->succeed("curl -XPOST 'http://127.0.0.1:8086/query' \\--data-urlencode 'q=CREATE DATABASE hydra'");machine.succeed("curl -XPOST 'http://127.0.0.1:8086/query' "+ "--data-urlencode 'q=CREATE DATABASE hydra'") - replacement in flake.nix at line 263
$machine->waitForJob("hydra-server");$machine->waitForOpenPort("3000");machine.wait_for_job("hydra-server")machine.wait_for_open_port("3000") - replacement in flake.nix at line 267
$machine->mustSucceed("su - hydra -c 'perl -I ${pkgs.hydra.perlDeps}/lib/perl5/site_perl ${./tests/setup-notifications-jobset.pl}' >&2");machine.succeed("su - hydra -c 'perl -I ${pkgs.hydra.perlDeps}/lib/perl5/site_perl ${./tests/setup-notifications-jobset.pl}' >&2") - replacement in flake.nix at line 273
$machine->waitUntilSucceeds("curl -s -H 'Accept: application/csv' \\-G 'http://127.0.0.1:8086/query?db=hydra' \\--data-urlencode 'q=SELECT * FROM hydra_build_status' | grep success");machine.wait_until_succeeds("curl -s -H 'Accept: application/csv' "+ "-G 'http://127.0.0.1:8086/query?db=hydra' "+ "--data-urlencode 'q=SELECT * FROM hydra_build_status' | grep success")