TestResolveSource_NoMatchFails verifies the plain not-found path is preserved for references that share no stable identity with any live source.
(t *testing.T)
| 74 | // TestResolveSource_NoMatchFails verifies the plain not-found path is preserved |
| 75 | // for references that share no stable identity with any live source. |
| 76 | func TestResolveSource_NoMatchFails(t *testing.T) { |
| 77 | t.Parallel() |
| 78 | |
| 79 | sm := &SessionManager{ |
| 80 | Sources: config.Sources{ |
| 81 | gordonKey("v9-dev"): config.NewBytesSource("dev", []byte("dev")), |
| 82 | }, |
| 83 | } |
| 84 | |
| 85 | _, err := sm.resolveSource(url.QueryEscape("http://localhost:7777/other-agent?gordonTag=v9-dev")) |
| 86 | require.Error(t, err) |
| 87 | assert.Contains(t, err.Error(), "agent not found") |
| 88 | } |
| 89 | |
| 90 | // TestResolveSource_LocalFileKeyExactOnly verifies that non-URL keys (local |
| 91 | // files, OCI refs) still resolve only by exact match, since their stable |
nothing calls this directly
no test coverage detected