From 51d29a4759a278d7d9b7edac7764b2836b4e4a6e Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 28 Dec 2023 00:37:28 +0000 Subject: [PATCH 1/2] nixosTests.nixops: Revert "tests.nixops: fix broken eval" to fix eval This reverts commit c946245c7a595c0834d3787ce4215419fc3df73b. Without the change test eval fail at top level of `nixpkgs` as: $ nix build --no-link -f. nixosTests.nixops error: function 'anonymous lambda' called without required argument 'testers' --- nixos/tests/nixops/default.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/nixos/tests/nixops/default.nix b/nixos/tests/nixops/default.nix index f7a26f2461c4..b8f747b2a19f 100644 --- a/nixos/tests/nixops/default.nix +++ b/nixos/tests/nixops/default.nix @@ -1,6 +1,4 @@ -{ pkgs -, testers -, ... }: +{ pkgs, ... }: let inherit (pkgs) lib; @@ -21,7 +19,7 @@ let passthru.override = args': testsForPackage (args // args'); }; - testLegacyNetwork = { nixopsPkg, ... }: testers.nixosTest ({ + testLegacyNetwork = { nixopsPkg, ... }: pkgs.nixosTest ({ name = "nixops-legacy-network"; nodes = { deployer = { config, lib, nodes, pkgs, ... }: { From 8f809e4630bfb2fa80499258b45ad428f0b29c71 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 31 Dec 2023 20:42:24 +0000 Subject: [PATCH 2/2] nixops_unstable: fix `tests` eval with `allowAliases = false;` Without the change `tests` eval fails as: $ nix build --no-link -f. nixops_unstable.tests --arg config '{ allowAliases = false; }' error: error: attribute 'nixosTest' missing 22| testLegacyNetwork = { nixopsPkg, ... }: pkgs.nixosTest ({ | ^ 23| name = "nixops-legacy-network"; Did you mean nixosTests? The alias is defined as: pkgs/top-level/aliases.nix: nixosTest = testers.nixosTest; # Added 2022-05-05 --- nixos/tests/nixops/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/tests/nixops/default.nix b/nixos/tests/nixops/default.nix index b8f747b2a19f..6501d13a2ed3 100644 --- a/nixos/tests/nixops/default.nix +++ b/nixos/tests/nixops/default.nix @@ -19,7 +19,7 @@ let passthru.override = args': testsForPackage (args // args'); }; - testLegacyNetwork = { nixopsPkg, ... }: pkgs.nixosTest ({ + testLegacyNetwork = { nixopsPkg, ... }: pkgs.testers.nixosTest ({ name = "nixops-legacy-network"; nodes = { deployer = { config, lib, nodes, pkgs, ... }: {