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";