mirror of
https://github.com/Mic92/sops-nix.git
synced 2025-03-31 04:14:37 +00:00
reference nixos tests in sops-install-secrets
This commit is contained in:
parent
b75e51c423
commit
38e71e351c
2 changed files with 12 additions and 4 deletions
|
@ -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=";
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
let
|
||||
makeTest = import <nixpkgs/nixos/tests/make-test-python.nix>;
|
||||
in {
|
||||
{ makeTest ? import <nixpkgs/nixos/tests/make-test-python.nix>, pkgs ? import <nixpkgs> }:
|
||||
{
|
||||
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;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue