nixos/tests: add google-cloud-sdk
This commit is contained in:
parent
4508ffac3a
commit
6bc1c21149
@ -157,6 +157,7 @@ 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 {};
|
||||
|
13
nixos/tests/google-cloud-sdk.nix
Normal file
13
nixos/tests/google-cloud-sdk.nix
Normal file
@ -0,0 +1,13 @@
|
||||
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"]
|
||||
'';
|
||||
})
|
@ -7,7 +7,7 @@
|
||||
# 3) used by `google-cloud-sdk` only on GCE guests
|
||||
#
|
||||
|
||||
{ stdenv, lib, fetchurl, makeWrapper, python, openssl, jq, with-gce ? false }:
|
||||
{ stdenv, lib, fetchurl, makeWrapper, nixosTests, python, openssl, jq, with-gce ? false }:
|
||||
|
||||
let
|
||||
pythonEnv = python.withPackages (p: with p; [
|
||||
@ -117,6 +117,10 @@ in stdenv.mkDerivation rec {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
tests = { inherit (nixosTests) google-cloud-sdk; };
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Tools for the google cloud platform";
|
||||
longDescription = "The Google Cloud SDK. This package has the programs: gcloud, gsutil, and bq";
|
||||
|
Loading…
Reference in New Issue
Block a user