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

Function TestRepoCacheKey_SameRepoDifferentRef

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

Source from the content-addressed store, hash-verified

167}
168
169func TestRepoCacheKey_SameRepoDifferentRef(t *testing.T) {
170 t.Parallel()
171
172 // Same repo, different ref should have DIFFERENT cache keys
173 node1, err := NewGitNode("https://github.com/foo/bar.git//file.yml?ref=main", "", false)
174 require.NoError(t, err)
175
176 node2, err := NewGitNode("https://github.com/foo/bar.git//file.yml?ref=dev", "", false)
177 require.NoError(t, err)
178
179 key1 := node1.repoCacheKey()
180 key2 := node2.repoCacheKey()
181
182 assert.NotEqual(t, key1, key2, "Different refs should generate different cache keys")
183}
184
185func TestRepoCacheKey_DifferentRepos(t *testing.T) {
186 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…