From d578031831033706d5e1eb8e63729d769687dbe2 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Mon, 11 Aug 2014 14:57:13 -0700 Subject: [PATCH] Added a second test for the other form of tilde paths --- helper/ssh/provisioner_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/helper/ssh/provisioner_test.go b/helper/ssh/provisioner_test.go index 63184d7fc..b9661449a 100644 --- a/helper/ssh/provisioner_test.go +++ b/helper/ssh/provisioner_test.go @@ -21,6 +21,14 @@ func Test_expandUserPath(t *testing.T) { if path != expected { t.Fatalf("bad: %v", path) } + + path, err = expandUserPath("~" + u.Username + "/path.pem") + if err != nil { + t.Fatalf("err: %v", err) + } + if path != expected { + t.Fatalf("bad: %v, %v", path) + } } func TestResourceProvider_verifySSH(t *testing.T) {