The fetcher's "saved opportunities" and "fetched opportunities" lines now name the source

This commit is contained in:
bwilliams committed 2026-10-21 14:36:22 +01:00
1 parent 50ee510520
commit c678b02662
4 files changed
+21 -3

No files matched your search

+4 -1
View File
@@ -921,9 +921,12 @@ func TestSaveSkipsNewOpportunities(t *testing.T) {
if !skipped(s) {
t.Error("a new matching opportunity wasn't skipped")
}
// Both lines name the source.
for _, want := range []string{
"msg=\"saved opportunities\" source=FindATender component=fetcher",
"skipped_opportunities=1",
"msg=\"skipped new opportunity\" component=fetcher uuid=ocds-1 filter=IT",
"msg=\"skipped new opportunity\" source=FindATender component=fetcher " +
"uuid=ocds-1 filter=IT",
} {
if !strings.Contains(logged.String(), want) {
t.Errorf("log has no %q:\n%s", want, logged.String())