treewide: nixosTest -> testers.nixosTest

This commit is contained in:
Robert Hensing 2022-05-09 14:04:29 +02:00
parent e8ffb6a727
commit ae172a2bb4
5 changed files with 8 additions and 7 deletions

View File

@ -569,8 +569,9 @@
<listitem>
<para>
The NixOS VM test framework,
<literal>pkgs.nixosTest</literal>/<literal>make-test-python.nix</literal>,
now requires detaching commands such as
<literal>pkgs.nixosTest</literal>/<literal>make-test-python.nix</literal>
(<literal>pkgs.testers.nixosTest</literal> since 22.05), now
requires detaching commands such as
<literal>succeed(&quot;foo &amp;&quot;)</literal> and
<literal>succeed(&quot;foo | xclip -i&quot;)</literal> to
close stdout. This can be done with a redirect such as

View File

@ -166,7 +166,7 @@ In addition to numerous new and upgraded packages, this release has the followin
## Backward Incompatibilities {#sec-release-21.11-incompatibilities}
- The NixOS VM test framework, `pkgs.nixosTest`/`make-test-python.nix`, now requires detaching commands such as `succeed("foo &")` and `succeed("foo | xclip -i")` to close stdout.
- The NixOS VM test framework, `pkgs.nixosTest`/`make-test-python.nix` (`pkgs.testers.nixosTest` since 22.05), now requires detaching commands such as `succeed("foo &")` and `succeed("foo | xclip -i")` to close stdout.
This can be done with a redirect such as `succeed("foo >&2 &")`. This breaking change was necessitated by a race condition causing tests to fail or hang.
It applies to all methods that invoke commands on the nodes, including `execute`, `succeed`, `fail`, `wait_until_succeeds`, `wait_until_fails`.

View File

@ -38,7 +38,7 @@ rec {
{ key = "no-revision";
# Make the revision metadata constant, in order to avoid needless retesting.
# The human version (e.g. 21.05-pre) is left as is, because it is useful
# for external modules that test with e.g. nixosTest and rely on that
# for external modules that test with e.g. testers.nixosTest and rely on that
# version number.
config.system.nixos.revision = mkForce "constant-nixos-revision";
}

View File

@ -1,4 +1,4 @@
{ lib, nixosTest, pkgs, writeText, hello, figlet, stdenvNoCC }:
{ lib, testers, pkgs, writeText, hello, figlet, stdenvNoCC }:
# -------------------------------------------------------------------------- #
#
@ -22,7 +22,7 @@ let
lib.attrValues (import file { inherit pkgs; })
);
in
nixosTest {
testers.nixosTest {
name = "nixpkgs-trivial-builders";
nodes.machine = { ... }: {
virtualisation.writableStore = true;

View File

@ -1,7 +1,7 @@
/*
This file is a test that makes sure that the `pkgs.nixos` and
`pkgs.nixosTest` functions work. It's far from a perfect test suite,
`pkgs.testers.nixosTest` functions work. It's far from a perfect test suite,
but better than not checking them at all on hydra.
To run this test: