(t *testing.T)
| 215 | } |
| 216 | |
| 217 | func TestRepoCacheKey_SSHvsHTTPS(t *testing.T) { |
| 218 | t.Parallel() |
| 219 | |
| 220 | // SSH vs HTTPS pointing to same repo should have SAME cache key |
| 221 | // They clone the same repo, so we want to share the cache |
| 222 | node1, err := NewGitNode("git@github.com:foo/bar.git//file.yml?ref=main", "", false) |
| 223 | require.NoError(t, err) |
| 224 | |
| 225 | node2, err := NewGitNode("https://github.com/foo/bar.git//file.yml?ref=main", "", false) |
| 226 | require.NoError(t, err) |
| 227 | |
| 228 | key1 := node1.repoCacheKey() |
| 229 | key2 := node2.repoCacheKey() |
| 230 | |
| 231 | assert.Equal(t, key1, key2, "SSH and HTTPS for same repo should share cache") |
| 232 | } |
| 233 | |
| 234 | func TestRepoCacheKey_Consistency(t *testing.T) { |
| 235 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…