Skip to content

Commit

Permalink
More tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pbitty committed Aug 20, 2024
1 parent 498e13a commit 5ee5324
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
15 changes: 13 additions & 2 deletions task_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1050,8 +1050,7 @@ func TestIncludesMultiLevel(t *testing.T) {
}

func TestIncludesRemote(t *testing.T) {
dir, err := filepath.Abs("./testdata/includes_remote")
require.NoError(t, err)
dir := "testdata/includes_remote"

srv := httptest.NewServer(http.FileServer(http.Dir(dir)))
defer srv.Close()
Expand All @@ -1068,6 +1067,18 @@ func TestIncludesRemote(t *testing.T) {
firstRemote: srv.URL + "/first/Taskfile.yml",
secondRemote: "./second/Taskfile.yml",
},
{
firstRemote: getGitRemoteURL(t, dir+"/first"),
secondRemote: getGitRemoteURL(t, dir+"/first/second"),
},
{
firstRemote: srv.URL + "/first/Taskfile.yml",
secondRemote: getGitRemoteURL(t, dir+"/first/second"),
},
{
firstRemote: getGitRemoteURL(t, dir+"/first"),
secondRemote: srv.URL + "/first/second/Taskfile.yml",
},
}

for i, tc := range tcs {
Expand Down
1 change: 0 additions & 1 deletion taskfile/node_remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ func (r *RemoteNode) Read(ctx context.Context) (Source, error) {
return Source{}, err
}

// TODO: Understand and harden support for //paths
taskfile, err := r.resolveTaskfilePath(r.logger, dir)
if err != nil {
return Source{}, err
Expand Down

0 comments on commit 5ee5324

Please sign in to comment.