Seed attribution in common tracker pattern helper
The common_tracker_patterns table now carries a NOT NULL attribution column, but the e2e seed helper still inserted without it, breaking TestThirdParty_ImportFromCommon and the catalog-link tracker pattern test with a not-null constraint violation. Seed the column with the UNDETERMINED verdict to match a freshly catalogued row. Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
@@ -667,11 +667,11 @@ func seedCommonTrackerPattern(t *testing.T) gid.GID {
|
||||
|
||||
_, err := conn.Exec(ctx, `
|
||||
INSERT INTO common_tracker_patterns (
|
||||
id, tracker_type, pattern, match_type, description, confidence, enrichment_attempts, created_at, updated_at
|
||||
id, tracker_type, pattern, match_type, description, confidence, attribution, enrichment_attempts, created_at, updated_at
|
||||
) VALUES (
|
||||
$1, $2, $3, $4, $5, $6, $7, $8, $9
|
||||
$1, $2, $3, $4, $5, $6, $7, $8, $9, $10
|
||||
)
|
||||
`, id, "COOKIE", "e2e_common_"+id.String(), "EXACT", "Seeded catalog description", 1.0, 0, now, now)
|
||||
`, id, "COOKIE", "e2e_common_"+id.String(), "EXACT", "Seeded catalog description", 1.0, coredata.CommonTrackerPatternAttributionUndetermined, 0, now, now)
|
||||
require.NoError(t, err)
|
||||
|
||||
t.Cleanup(func() {
|
||||
|
||||
Reference in New Issue
Block a user