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

Function TestRepoCacheKey_DifferentRepos

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

Source from the content-addressed store, hash-verified

183}
184
185func TestRepoCacheKey_DifferentRepos(t *testing.T) {
186 t.Parallel()
187
188 // Different repos should have DIFFERENT cache keys
189 node1, err := NewGitNode("https://github.com/foo/bar.git//file.yml?ref=main", "", false)
190 require.NoError(t, err)
191
192 node2, err := NewGitNode("https://github.com/foo/other.git//file.yml?ref=main", "", false)
193 require.NoError(t, err)
194
195 key1 := node1.repoCacheKey()
196 key2 := node2.repoCacheKey()
197
198 assert.NotEqual(t, key1, key2, "Different repos should generate different cache keys")
199}
200
201func TestRepoCacheKey_NoRefVsExplicitRef(t *testing.T) {
202 t.Parallel()

Callers

nothing calls this directly

Calls 2

repoCacheKeyMethod · 0.95
NewGitNodeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…