(t *testing.T)
| 151 | } |
| 152 | |
| 153 | func TestRepoCacheKey_SameRepoSameRef(t *testing.T) { |
| 154 | t.Parallel() |
| 155 | |
| 156 | // Same repo, same ref, different files should have SAME cache key |
| 157 | node1, err := NewGitNode("https://github.com/foo/bar.git//file1.yml?ref=main", "", false) |
| 158 | require.NoError(t, err) |
| 159 | |
| 160 | node2, err := NewGitNode("https://github.com/foo/bar.git//dir/file2.yml?ref=main", "", false) |
| 161 | require.NoError(t, err) |
| 162 | |
| 163 | key1 := node1.repoCacheKey() |
| 164 | key2 := node2.repoCacheKey() |
| 165 | |
| 166 | assert.Equal(t, key1, key2, "Same repo+ref should generate same cache key regardless of file path") |
| 167 | } |
| 168 | |
| 169 | func TestRepoCacheKey_SameRepoDifferentRef(t *testing.T) { |
| 170 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…