Skip to content
Snippets Groups Projects
Unverified Commit 12077f5d authored by Christian Rebischke's avatar Christian Rebischke Committed by GitHub
Browse files

skip openssh tests if ssh-keygen is not in PATH (#378)


This commit adds a PATH lookup to the openSSH tests.
This prevents failing tests on systems with no ssh-keygen
in PATH.

Signed-off-by: default avatarChristian Rebischke <chris@shibumi.dev>
parent 5e005eb1
No related branches found
No related tags found
No related merge requests found
......@@ -140,6 +140,9 @@ func TestFromOpenSSH(t *testing.T) {
priv: ed25519PrivateKey,
},
} {
if _, err := exec.LookPath("ssh-keygen"); err != nil {
t.Skip("skip TestFromOpenSSH: missing ssh-keygen in PATH")
}
t.Run(tt.name, func(t *testing.T) {
tt := tt
......@@ -193,6 +196,9 @@ func TestToOpenSSH(t *testing.T) {
priv: ed25519PrivateKey,
},
} {
if _, err := exec.LookPath("ssh-keygen"); err != nil {
t.Skip("skip TestToOpenSSH: missing ssh-keygen in PATH")
}
t.Run(tt.name, func(t *testing.T) {
tt := tt
// Test that a signature from here can validate in the CLI.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment