Skip to content

Commit 9411c02

Browse files
fix(doccano-django): nest globalNoise schema so the filter actually applies
keploy's GlobalNoise type is map[string]map[string][]string — outer key is the response section ("header" / "body"), inner key is the field name. Flat dotted keys like `body.created_at: []` get put into the outer map as literal key "body.created_at" and never match any section, so the noise is silently dropped. The template's drift-suppression list was a no-op; only Date got ignored at compare time because keploy auto-stamps Date as per-test noise on every recording, and everything else slipped through. Same shape of fix landed in samples-typescript/umami-postgres in 93bbdae; documenting the gotcha in this template's comments so the next sample doesn't repeat it. Validation pending — doccano cells haven't run yet on the active keploy/enterprise PR (#1889). The matrix-cell collision fix landed in keploy/enterprise#1889 (commit 84cd64b1) opens up the lane enough for the noise filter to actually be exercised against real drift. Signed-off-by: Akash Kumar <meakash7902@gmail.com>
1 parent 568b0bb commit 9411c02

1 file changed

Lines changed: 20 additions & 6 deletions

File tree

doccano-django/keploy.yml.template

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,23 @@
2929
test:
3030
globalNoise:
3131
global:
32-
body.created_at: []
33-
body.updated_at: []
34-
body.results.created_at: []
35-
body.results.updated_at: []
36-
header.Date: []
37-
header.Expires: []
32+
# keploy's GlobalNoise is map[section][field][values]
33+
# (sections "header" / "body"; field one level deep). Flat
34+
# dotted keys like `body.created_at: []` end up as literal
35+
# outer-map keys "body.created_at" that never match any
36+
# section, so the noise is silently a no-op. The only reason
37+
# this didn't surface as a flake on every auto_now field is
38+
# that keploy auto-stamps Date as per-test noise on every
39+
# recording — everything else slipped through.
40+
header:
41+
Date: []
42+
Expires: []
43+
body:
44+
# Top-level fields cover the single-object responses;
45+
# keploy's matcher walks the JSON tree and applies the
46+
# noise list every place these field names appear, so
47+
# entries inside DRF's `results` array are also stripped
48+
# without needing a separate `body.results.created_at`
49+
# path (which keploy's flat-key map can't address anyway).
50+
created_at: []
51+
updated_at: []

0 commit comments

Comments
 (0)