diff --git a/pkgs/sops-install-secrets/default.nix b/pkgs/sops-install-secrets/default.nix index 0b3e0b8..8e3e1e3 100644 --- a/pkgs/sops-install-secrets/default.nix +++ b/pkgs/sops-install-secrets/default.nix @@ -1,4 +1,4 @@ -{ buildGoModule }: +{ buildGoModule, path, pkgs }: buildGoModule { pname = "sops-install-secrets"; version = "0.0.1"; @@ -9,5 +9,10 @@ buildGoModule { subPackages = [ "pkgs/sops-install-secrets" ]; + passthru.tests = import ./nixos-test.nix { + makeTest = import (path + "/nixos/tests/make-test-python.nix"); + inherit pkgs; + }; + vendorSha256 = "sha256-O0z+oEffOOZa/bn2gV9onLVbPBHsNDH2yq1CZPi8w58="; } diff --git a/pkgs/sops-install-secrets/nixos-test.nix b/pkgs/sops-install-secrets/nixos-test.nix index fb0988a..86d3654 100644 --- a/pkgs/sops-install-secrets/nixos-test.nix +++ b/pkgs/sops-install-secrets/nixos-test.nix @@ -1,6 +1,5 @@ -let - makeTest = import ; -in { +{ makeTest ? import , pkgs ? import }: +{ ssh-keys = makeTest { nodes.server = { ... }: { imports = [ ../../modules/sops ]; @@ -18,6 +17,8 @@ in { start_all() server.succeed("cat /run/secrets/test_key | grep -q test_value") ''; + } { + inherit pkgs; }; gpg-keys = makeTest { @@ -43,5 +44,7 @@ in { start_all() server.succeed("cat /run/secrets/test_key | grep -q test_value") ''; + } { + inherit pkgs; }; }