MCPcopy
hub / github.com/go-task/task / TestGitNode_ssh

Function TestGitNode_ssh

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

Source from the content-addressed store, hash-verified

8)
9
10func TestGitNode_ssh(t *testing.T) {
11 t.Parallel()
12
13 node, err := NewGitNode("git@github.com:foo/bar.git//Taskfile.yml?ref=main", "", false)
14 assert.NoError(t, err)
15 assert.Equal(t, "main", node.ref)
16 assert.Equal(t, "Taskfile.yml", node.path)
17 assert.Equal(t, "ssh://git@github.com/foo/bar.git//Taskfile.yml?ref=main", node.Location())
18 assert.Equal(t, "ssh://git@github.com/foo/bar.git", node.url.String())
19 entrypoint, err := node.ResolveEntrypoint("common.yml")
20 assert.NoError(t, err)
21 assert.Equal(t, "ssh://git@github.com/foo/bar.git//common.yml?ref=main", entrypoint)
22}
23
24func TestGitNode_sshWithAltRepo(t *testing.T) {
25 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…