Convert all tests to the Python DSL

[?]
May 11, 2020, 7:36 PM
Z3JVFE2RRONRR2MCEIK7JO3MJL4G2QJXZIHNRYMHDF6ULPN2PKAQC

Dependencies

  • [2] RWNXH3H2 lastModified -> lastModifiedDate
  • [3] 75BCCX2T Get rid of dependency to SQLite

Change contents

  • replacement in flake.nix at line 178
    [2.5507][2.5507:5596]()
    with import (nixpkgs + "/nixos/lib/testing.nix") { system = "x86_64-linux"; };
    [2.5507]
    [2.5596]
    with import (nixpkgs + "/nixos/lib/testing-python.nix") { system = "x86_64-linux"; };
  • replacement in flake.nix at line 183
    [2.5696][2.5696:6043]()
    $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/");
    [2.5696]
    [2.6043]
    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
    [2.6108][2.6108:6197]()
    with import (nixpkgs + "/nixos/lib/testing.nix") { system = "x86_64-linux"; };
    [2.6108]
    [2.6197]
    with import (nixpkgs + "/nixos/lib/testing-python.nix") { system = "x86_64-linux"; };
  • replacement in flake.nix at line 199
    [2.6358][2.6358:6410]()
    $machine->waitForJob("hydra-init");
    [2.6358]
    [2.6410]
    machine.wait_for_job("hydra-init")
  • replacement in flake.nix at line 202
    [2.6475][2.6475:6964]()
    $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"
    );
    [2.6475]
    [2.6964]
    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
    """
    )
  • replacement in flake.nix at line 213
    [2.6965][2.6965:7158]()
    $machine->succeed("systemctl stop hydra-evaluator hydra-queue-runner");
    $machine->waitForJob("hydra-server");
    $machine->waitForOpenPort("3000");
    [2.6965]
    [2.7158]
    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
    [2.7196][2.7196:7332]()
    $machine->mustSucceed("su - hydra -c 'perl -I ${pkgs.hydra.perlDeps}/lib/perl5/site_perl ${./tests/api-test.pl}' >&2");
    [2.7196]
    [2.7332]
    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
    [2.7405][2.7405:7494]()
    with import (nixpkgs + "/nixos/lib/testing.nix") { system = "x86_64-linux"; };
    [2.7405]
    [2.7494]
    with import (nixpkgs + "/nixos/lib/testing-python.nix") { system = "x86_64-linux"; };
  • replacement in flake.nix at line 238
    [2.7885][2.7885:7935]()
    $machine->waitForJob("hydra-init");
    [2.7885]
    [2.7935]
    machine.wait_for_job("hydra-init")
  • replacement in flake.nix at line 241
    [2.7998][2.7998:8444]()
    $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"
    );
    [2.7998]
    [2.8444]
    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
    """
    )
  • replacement in flake.nix at line 253
    [2.8506][2.8506:8603]()
    $machine->waitForJob("influxdb");
    $machine->waitForOpenPort("8086");
    [2.8506]
    [2.8603]
    machine.wait_for_job("influxdb")
    machine.wait_for_open_port("8086")
  • replacement in flake.nix at line 257
    [2.8674][2.8674:8831]()
    $machine->succeed(
    "curl -XPOST 'http://127.0.0.1:8086/query' \\
    --data-urlencode 'q=CREATE DATABASE hydra'");
    [2.8674]
    [2.8831]
    machine.succeed(
    "curl -XPOST 'http://127.0.0.1:8086/query' "
    + "--data-urlencode 'q=CREATE DATABASE hydra'"
    )
  • replacement in flake.nix at line 263
    [2.8898][2.8898:8999]()
    $machine->waitForJob("hydra-server");
    $machine->waitForOpenPort("3000");
    [2.8898]
    [2.8999]
    machine.wait_for_job("hydra-server")
    machine.wait_for_open_port("3000")
  • replacement in flake.nix at line 267
    [2.9045][2.9045:9214]()
    $machine->mustSucceed(
    "su - hydra -c 'perl -I ${pkgs.hydra.perlDeps}/lib/perl5/site_perl ${./tests/setup-notifications-jobset.pl}' >&2");
    [2.9045]
    [2.9214]
    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
    [2.9356][2.9356:9605]()
    $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");
    [2.9356]
    [2.9605]
    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"
    )