flake.nix: drop the API test

[?]
Apr 28, 2021, 10:32 PM
IIWRB3BZABXBWJTBKCGQXEA5WXFY45KWCCX4532S4SRF7ZWLLUGAC

Dependencies

  • [2] KSFJOFIC Make PathInput plugin cache validity configurable
  • [3] 2JJP7673 tests: move to t, allow `yath test` from root
  • [4] RWNXH3H2 lastModified -> lastModifiedDate
  • [5] Z3JVFE2R Convert all tests to the Python DSL

Change contents

  • edit in flake.nix at line 458
    [4.6074][4.6074:6108](),[4.6108][4.438:534](),[4.534][4.6197:6220](),[4.6197][4.6197:6220](),[4.6220][2.0:382](),[2.382][4.6255:6358](),[4.6255][4.6255:6358](),[4.6358][4.535:586]()
    tests.api.x86_64-linux =
    with import (nixpkgs + "/nixos/lib/testing-python.nix") { system = "x86_64-linux"; };
    simpleTest {
    machine = { pkgs, ... }: {
    imports = [ hydraServer ];
    # No caching for PathInput plugin, otherwise we get wrong values
    # (as it has a 30s window where no changes to the file are considered).
    services.hydra-dev.extraConfig = ''
    path_input_cache_validity_seconds = 0
    '';
    };
    testScript =
    let dbi = "dbi:Pg:dbname=hydra;user=root;"; in
    ''
    machine.wait_for_job("hydra-init")
  • edit in flake.nix at line 459
    [4.6411][4.6411:6475](),[4.6475][4.587:880](),[4.880][3.312:383](),[3.383][4.955:1111](),[4.955][4.955:1111](),[4.1111][4.6964:6965](),[4.6964][4.6964:6965](),[4.6965][4.1112:1301](),[4.1301][4.7158:7196](),[4.7158][4.7158:7196](),[4.7196][4.1302:1335](),[4.1335][3.384:496](),[3.496][4.1451:1469](),[4.1451][4.1451:1469](),[4.1469][4.7332:7362](),[4.7332][4.7332:7362]()
    # Create an admin account and some other state.
    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 ${./t/api-test.nix} /run/jobset/default.nix
    chmod 644 /run/jobset/default.nix
    chown -R hydra /run/jobset /tmp/nix
    """
    )
    machine.succeed("systemctl stop hydra-evaluator hydra-queue-runner")
    machine.wait_for_job("hydra-server")
    machine.wait_for_open_port("3000")
    # Run the API tests.
    machine.succeed(
    "su - hydra -c 'perl -I ${pkgs.hydra.perlDeps}/lib/perl5/site_perl ${./t/api-test.pl}' >&2"
    )
    '';
    };