--------------------------------------------------------------------------- pluginRegistry first-wins semantics --------------------------------------------------------------------------- When two plugins both expose the same short path, the first registry entry wins (ReadFile returns the first matc
(t *testing.T)
| 277 | // When two plugins both expose the same short path, the first registry entry |
| 278 | // wins (ReadFile returns the first match and does not error). |
| 279 | func TestRegistry_ReadFile_FirstPluginWins(t *testing.T) { |
| 280 | origRegistry := registry |
| 281 | origOpen := registrationOpen |
| 282 | t.Cleanup(func() { |
| 283 | registry = origRegistry |
| 284 | registrationOpen = origOpen |
| 285 | }) |
| 286 | p1 := newTestPlugin(t) |
| 287 | p2 := newTestPlugin(t) |
| 288 | registry = pluginRegistry{p1, p2} |
| 289 | |
| 290 | b, err := registry.ReadFile("html/public/index.html") |
| 291 | require.NoError(t, err) |
| 292 | assert.NotEmpty(t, b) |
| 293 | } |
| 294 | |
| 295 | // --------------------------------------------------------------------------- |
| 296 | // WriteBytes / ReadBytes round-trip |
nothing calls this directly
no test coverage detected