Fix the API test

[?]
Aug 12, 2015, 1:40 PM
Q3VTDUSQ75JD5L55VWQV6MGAS6IC4AWGSADL2ISMX5E7R3LBVBHAC

Dependencies

  • [2] 5QYMALGU Fix Perl error in tests.api
  • [3] WQ2VQ7H3 Use hydra-module.nix in the tests
  • [4] YI3BZG5N Cleanup Jobset serialization
  • [5] MQYHIUEE Cleanup eval serialization
  • [6] LZVO64YG Merge in the first bits of the API work
  • [7] SYLVCTT6 Start api cleanup with the User model
  • [8] ZIIXICG7 Make the outputs' outpaths available via the Build JSON API
  • [9] 2DGIP6L4 Cleanup build serialization
  • [10] 4VYSDP4I Add eager fetching of relations and enable that for jobset->jobsetinputs
  • [11] KYSBJAYN Allow dashes in jobset input names
  • [12] NP7IOJ4Q Flesh out the API a bit
  • [*] T4LLYESZ * Nix expression for building Hydra.

Change contents

  • edit in release.nix at line 16
    [3.135]
    [3.135]
    virtualisation.writableStore = true;
  • replacement in release.nix at line 220
    [3.1329][3.1373:1530](),[3.1530][2.128:320]()
    # Start the web interface with some weird settings.
    $machine->succeed("systemctl stop hydra-server hydra-evaluator hydra-queue-runner");
    $machine->mustSucceed("su - hydra -c 'NIX_STORE_DIR=/tmp/nix/store NIX_LOG_DIR=/tmp/nix/var/log/nix NIX_STATE_DIR=/tmp/nix/var/nix NIX_REMOTE= DBIC_TRACE=1 hydra-server -d' >&2 &");
    [3.1329]
    [3.1606]
    $machine->succeed("systemctl stop hydra-evaluator hydra-queue-runner");
    $machine->waitForJob("hydra-server");
  • replacement in tests/api-test.pl at line 52
    [3.245][2.406:553]()
    system("NIX_STORE_DIR=/tmp/nix/store NIX_LOG_DIR=/tmp/nix/var/log/nix NIX_STATE_DIR=/tmp/nix/var/nix NIX_REMOTE= hydra-evaluator sample default");
    [3.245]
    [3.38737]
    system("hydra-evaluator sample default");
  • replacement in tests/api-test.pl at line 59
    [3.39017][3.39017:39049](),[3.39049][3.2361:2529]()
    # Ugh, cached for 30s
    sleep 30;
    system("echo >> /run/jobset/default.nix; NIX_STORE_DIR=/tmp/nix/store NIX_LOG_DIR=/tmp/nix/var/log/nix NIX_STATE_DIR=/tmp/nix/var/nix hydra-evaluator sample default");
    [3.39017]
    [3.39299]
    system("echo >> /run/jobset/default.nix; hydra-evaluator sample default");
  • replacement in tests/api-test.pl at line 66
    [3.39798][3.2530:2678]()
    ok($build->{buildoutputs}->{out}->{path} =~ /^\/tmp\/nix\/store\/[a-zA-Z0-9]{32}-job$/, "The build's outpath is in the nix store and named 'job'");
    [3.39798]
    ok($build->{buildoutputs}->{out}->{path} =~ /^\/nix\/store\/[a-zA-Z0-9]{32}-job$/, "The build's outpath is in the Nix store and named 'job'");