Commit graph

18 commits

Author SHA1 Message Date
Graham Christensen 5836bc9a11 HydraTestContext::makeAndEvaluateJobset: make a random user 2021-12-14 20:48:07 -05:00
Graham Christensen adfe74b76a HydraTestContext: give a helper for creating a project, jobset, evaluating jobs, and optionally building them.
In return, get a hash of all the build records.
2021-12-14 20:25:42 -05:00
Graham Christensen 3238496b3d t/Setup: move subs calling hydra-* programs to a CliPrograms module
Makes it so HydraTestContext can call them without an import loop
2021-12-14 20:25:02 -05:00
Graham Christensen 1fa141229f HydraTestContext: explicitly stop the db
This might, hopefully, I don't know, possibly force the
database to live a little while longer and *reduce* but not
eliminate errors around stopping the database before we lose all
our DB::PG handles to it.
2021-12-14 19:51:12 -05:00
Graham Christensen eca09bc980 Attempt to fix errors during test teardown 2021-12-14 16:31:41 -05:00
Luke Granger-Brown f2b51a017b Test Setup: fix evalSucceeds to actually output evaluation errors
At the moment, the jobset object is unlikely to actually retrieve the
evaluation error output, because it isn't refreshed after
hydra-eval-jobsets is run.

Explicitly calling DBIx::Class::Row->discard_changes causes any updated
data to be refreshed, at the cost of losing any not-yet committed
changes to the row.
2021-10-26 10:13:58 +01:00
Your Name 55b7802b61 t/lib/Setup.pm: nix_config: default to empty string 2021-09-06 22:13:33 -04:00
Your Name 4677a7c894 perlcritic: use strict, use warnings 2021-09-06 22:13:33 -04:00
Shay Bergmann ba557972c7
Add test to verify includes work 2021-07-26 17:16:40 +00:00
regnat 9c787e5e94 Document the use_external_destination_store test_init param 2021-04-29 07:24:20 +02:00
Théophane Hufschmitt 7af63658f1 tests: Make the external destination store optional
Co-authored-by: Graham Christensen <graham@grahamc.com>
2021-04-29 07:24:20 +02:00
regnat 0d3977866e Run the tests with a remote dest store
Set `dest_store` in the test hydra config, so that the testsuite ensures
that the distinction between the local store and the destination store
is properly taken into account.

Fix #938
2021-04-28 12:22:54 +02:00
Graham Christensen e45f852277 tests: allow specifying some nix config 2021-04-14 14:19:10 -04:00
Graham Christensen c7ac123dc5 Setup.pm: specify NIX_ env vars for running yath
Otherwise yath will try to use global configuration.
2021-04-14 14:19:10 -04:00
Graham Christensen 74d34c0f80 t/Setup.pm: sort NIX_ env vars 2021-04-14 14:19:09 -04:00
Graham Christensen 8aa59dcc1b Drop references to NIX_MANFIESTS_DIR and NIX_BUILD_HOOK
Neither of these have been supported in ~years.
2021-04-14 14:19:09 -04:00
Graham Christensen 6f662a606a
hydra-send-stats: add a failing test asserting it can run 2021-03-20 09:14:14 -04:00
Cole Helbling 025be052b7
tests: move to t, allow yath test from root
By moving the tests subdirectory to t, we gain the ability to run `yath
test` with no arguments from inside `nix develop` in the root of the
the repo.

(`nix develop` is necessary in order to set the proper env vars for
`yath` to find our test libraries.)
2021-03-05 09:49:06 -08:00