Commit cf08f854 authored by Danielle Tomlinson's avatar Danielle Tomlinson
Browse files

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.
parent 4014ee30
No related merge requests found
Showing with 2 additions and 1 deletion
+2 -1
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)
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment