on master help sign in
Added sample test for private repos
commite2f03568e991a1a961c660e7c7b5c89267267ba3 authorAriel Nunez <ingenieroariel@gmail.com> dateWed 8 Jan 2020, 18:12 (7 years ago) parentc8e71d4
1 file changed+5−2
release.nix+5−2
release.nix+5−2
@@ -5,7 +5,8 @@ let
55 pkgs = import (builtins.fetchTarball https://github.com/nixos/nixpkgs/archive/3de5266.tar.gz) {};
66 sshKeys = import (pkgs.path + /nixos/tests/ssh-keys.nix) pkgs;
77 make-test = import (pkgs.path + /nixos/tests/make-test-python.nix);
8− supportedPlatforms = [ "x86_64-linux" "x86_64-darwin" ];
8+ #supportedPlatforms = [ "x86_64-linux" "x86_64-darwin" ];
9+ supportedPlatforms = [ "x86_64-linux" ];
910 obelisk-everywhere = (import ./everywhere.nix { cacheBuildSystems = supportedPlatforms; }).metaCache;
1011 snakeOilPrivateKey = sshKeys.snakeOilPrivateKey.text;
1112 snakeOilPublicKey = sshKeys.snakeOilPublicKey;
@@ -99,6 +100,8 @@ in
99100 client.succeed("ob thunk pack ~/code/myapp")
100101 client.succeed("grep -qF 'git' ~/code/myapp/default.nix")
101102 client.succeed("grep -qF 'myorg' ~/code/myapp/git.json")
102− client.succeed('[ "$(jq .private < ~/code/myapp/git.json)" == "false" ] ')
103+
104+ with subtest("test obelisk can detect private repos"):
105+ client.succeed("""grep -qF '"private": false' ~/code/myapp/git.json""")
103106 '';
104107 })