From 88cff9d704469d6d42396141d1a78a01ec5d7c5f Mon Sep 17 00:00:00 2001 From: Patrick Hilhorst Date: Thu, 28 Oct 2021 14:44:26 +0200 Subject: [PATCH 1/3] google-cloud-sdk: move nixos test to installCheck --- nixos/tests/all-tests.nix | 1 - nixos/tests/google-cloud-sdk.nix | 13 ------------- pkgs/tools/admin/google-cloud-sdk/default.nix | 9 ++++++--- 3 files changed, 6 insertions(+), 17 deletions(-) delete mode 100644 nixos/tests/google-cloud-sdk.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 63c307c09833..9e5dbf1052bb 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -157,7 +157,6 @@ in gobgpd = handleTest ./gobgpd.nix {}; gocd-agent = handleTest ./gocd-agent.nix {}; gocd-server = handleTest ./gocd-server.nix {}; - google-cloud-sdk = handleTest ./google-cloud-sdk.nix {}; google-oslogin = handleTest ./google-oslogin {}; gotify-server = handleTest ./gotify-server.nix {}; grafana = handleTest ./grafana.nix {}; diff --git a/nixos/tests/google-cloud-sdk.nix b/nixos/tests/google-cloud-sdk.nix deleted file mode 100644 index 3150b2d53c2c..000000000000 --- a/nixos/tests/google-cloud-sdk.nix +++ /dev/null @@ -1,13 +0,0 @@ -import ./make-test-python.nix ({ pkgs, ... }: { - name = "google-cloud-sdk"; - meta = with pkgs.lib.maintainers; { maintainers = [ iammrinal0 ]; }; - - machine = { pkgs, ... }: { - environment.systemPackages = [ pkgs.google-cloud-sdk ]; - }; - - testScript = '' - import json - assert "${pkgs.google-cloud-sdk.version}" in json.loads(machine.succeed("gcloud version --format json"))["Google Cloud SDK"] - ''; -}) diff --git a/pkgs/tools/admin/google-cloud-sdk/default.nix b/pkgs/tools/admin/google-cloud-sdk/default.nix index af33f1b91191..3ab4ff5c8799 100644 --- a/pkgs/tools/admin/google-cloud-sdk/default.nix +++ b/pkgs/tools/admin/google-cloud-sdk/default.nix @@ -117,9 +117,12 @@ in stdenv.mkDerivation rec { runHook postInstall ''; - passthru = { - tests = { inherit (nixosTests) google-cloud-sdk; }; - }; + + doInstallCheck = true; + # Minor smoke test, used to be a NixOS test. + installCheckPhase = '' + $out/bin/gcloud version --format json | jq '."Google Cloud SDK"' | grep "${version}" + ''; meta = with lib; { description = "Tools for the google cloud platform"; From b9cb71c48ba8b99c66040de1f9c961d6ada829ec Mon Sep 17 00:00:00 2001 From: Sandro Date: Fri, 29 Oct 2021 17:37:21 +0200 Subject: [PATCH 2/3] Update pkgs/tools/admin/google-cloud-sdk/default.nix --- pkgs/tools/admin/google-cloud-sdk/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/tools/admin/google-cloud-sdk/default.nix b/pkgs/tools/admin/google-cloud-sdk/default.nix index 3ab4ff5c8799..17be23a88e35 100644 --- a/pkgs/tools/admin/google-cloud-sdk/default.nix +++ b/pkgs/tools/admin/google-cloud-sdk/default.nix @@ -117,7 +117,6 @@ in stdenv.mkDerivation rec { runHook postInstall ''; - doInstallCheck = true; # Minor smoke test, used to be a NixOS test. installCheckPhase = '' From 4f8999daba5dd5f56783d06f9478cde224e7637a Mon Sep 17 00:00:00 2001 From: Patrick Hilhorst Date: Fri, 29 Oct 2021 17:38:42 +0200 Subject: [PATCH 3/3] Update pkgs/tools/admin/google-cloud-sdk/default.nix Co-authored-by: Sandro --- pkgs/tools/admin/google-cloud-sdk/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/tools/admin/google-cloud-sdk/default.nix b/pkgs/tools/admin/google-cloud-sdk/default.nix index 17be23a88e35..8ab301eeb38c 100644 --- a/pkgs/tools/admin/google-cloud-sdk/default.nix +++ b/pkgs/tools/admin/google-cloud-sdk/default.nix @@ -118,7 +118,6 @@ in stdenv.mkDerivation rec { ''; doInstallCheck = true; - # Minor smoke test, used to be a NixOS test. installCheckPhase = '' $out/bin/gcloud version --format json | jq '."Google Cloud SDK"' | grep "${version}" '';