treewide: nixosTest -> testers.nixosTest
This commit is contained in:
parent
e8ffb6a727
commit
ae172a2bb4
|
@ -569,8 +569,9 @@
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The NixOS VM test framework,
|
The NixOS VM test framework,
|
||||||
<literal>pkgs.nixosTest</literal>/<literal>make-test-python.nix</literal>,
|
<literal>pkgs.nixosTest</literal>/<literal>make-test-python.nix</literal>
|
||||||
now requires detaching commands such as
|
(<literal>pkgs.testers.nixosTest</literal> since 22.05), now
|
||||||
|
requires detaching commands such as
|
||||||
<literal>succeed("foo &")</literal> and
|
<literal>succeed("foo &")</literal> and
|
||||||
<literal>succeed("foo | xclip -i")</literal> to
|
<literal>succeed("foo | xclip -i")</literal> to
|
||||||
close stdout. This can be done with a redirect such as
|
close stdout. This can be done with a redirect such as
|
||||||
|
|
|
@ -166,7 +166,7 @@ In addition to numerous new and upgraded packages, this release has the followin
|
||||||
|
|
||||||
## Backward Incompatibilities {#sec-release-21.11-incompatibilities}
|
## 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.
|
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`.
|
It applies to all methods that invoke commands on the nodes, including `execute`, `succeed`, `fail`, `wait_until_succeeds`, `wait_until_fails`.
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ rec {
|
||||||
{ key = "no-revision";
|
{ key = "no-revision";
|
||||||
# Make the revision metadata constant, in order to avoid needless retesting.
|
# 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
|
# 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.
|
# version number.
|
||||||
config.system.nixos.revision = mkForce "constant-nixos-revision";
|
config.system.nixos.revision = mkForce "constant-nixos-revision";
|
||||||
}
|
}
|
||||||
|
|
|
@ -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; })
|
lib.attrValues (import file { inherit pkgs; })
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
nixosTest {
|
testers.nixosTest {
|
||||||
name = "nixpkgs-trivial-builders";
|
name = "nixpkgs-trivial-builders";
|
||||||
nodes.machine = { ... }: {
|
nodes.machine = { ... }: {
|
||||||
virtualisation.writableStore = true;
|
virtualisation.writableStore = true;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
|
|
||||||
This file is a test that makes sure that the `pkgs.nixos` and
|
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.
|
but better than not checking them at all on hydra.
|
||||||
|
|
||||||
To run this test:
|
To run this test:
|
||||||
|
|
Loading…
Reference in a new issue