MCPcopy Index your code
hub / github.com/go-task/task / TestGitNode_sshWithDir

Function TestGitNode_sshWithDir

taskfile/node_git_test.go:35–47  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

33}
34
35func TestGitNode_sshWithDir(t *testing.T) {
36 t.Parallel()
37
38 node, err := NewGitNode("git@github.com:foo/bar.git//directory/Taskfile.yml?ref=main", "", false)
39 assert.NoError(t, err)
40 assert.Equal(t, "main", node.ref)
41 assert.Equal(t, "directory/Taskfile.yml", node.path)
42 assert.Equal(t, "ssh://git@github.com/foo/bar.git//directory/Taskfile.yml?ref=main", node.Location())
43 assert.Equal(t, "ssh://git@github.com/foo/bar.git", node.url.String())
44 entrypoint, err := node.ResolveEntrypoint("common.yml")
45 assert.NoError(t, err)
46 assert.Equal(t, "ssh://git@github.com/foo/bar.git//directory/common.yml?ref=main", entrypoint)
47}
48
49func TestGitNode_https(t *testing.T) {
50 t.Parallel()

Callers

nothing calls this directly

Calls 4

LocationMethod · 0.95
ResolveEntrypointMethod · 0.95
NewGitNodeFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…