From 9b65d30bad90daf3b124303324dcb3a0d45c4502 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 15 Dec 2020 04:05:56 +0100 Subject: [PATCH] ssh-to-pgp: fix tests --- pkgs/ssh-to-pgp/main_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/ssh-to-pgp/main_test.go b/pkgs/ssh-to-pgp/main_test.go index 3a29217..1b01103 100644 --- a/pkgs/ssh-to-pgp/main_test.go +++ b/pkgs/ssh-to-pgp/main_test.go @@ -30,8 +30,10 @@ func TempRoot() string { } func TestCli(t *testing.T) { - _, filename, _, _ := runtime.Caller(0) - assets := path.Join(path.Dir(filename), "test-assets") + assets := os.Getenv("TEST_ASSETS") + if assets == "" { + assets = "test-assets" + } tempdir, err := ioutil.TempDir(TempRoot(), "testdir") ok(t, err) defer os.RemoveAll(tempdir)