From cf08f85413488242e3c98e9cec4e538268af43bd Mon Sep 17 00:00:00 2001 From: Danielle Tomlinson Date: Thu, 10 Jan 2019 13:43:51 +0100 Subject: [PATCH] api: Validate the slash variant of a given path This validates the slash variant of a RelativeDest, rather than the platform native version, to support test execution on windows. --- api/tasks_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/tasks_test.go b/api/tasks_test.go index da66aac18..14a151717 100644 --- a/api/tasks_test.go +++ b/api/tasks_test.go @@ -1,6 +1,7 @@ package api import ( + "path/filepath" "reflect" "testing" "time" @@ -364,7 +365,7 @@ func TestTask_Artifact(t *testing.T) { if *a.GetterMode != "file" { t.Errorf("expected file but found %q", *a.GetterMode) } - if *a.RelativeDest != "local/foo.txt" { + if filepath.ToSlash(*a.RelativeDest) != "local/foo.txt" { t.Errorf("expected local/foo.txt but found %q", *a.RelativeDest) } }