Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
bassosimone committed Feb 7, 2024
1 parent 521e6ca commit 270dba5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/database/actions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,13 @@ func TestUpdateDatabaseMeasurementWithSummaryKeys(t *testing.T) {
ffiller := &testingx.FakeFiller{}
ffiller.Fill(sk)

// This field is not serialized, because historically it was used as an ABI to
// communicate between probe-engine and probe-cli, so we should not allow the fake
// filler to initialize it to a random value, otherwise we'll have issues in 50%
// of the cases where we would expect true and unmarshal false. For this reason,
// let's always set the field to the expected unmarshal value, i.e., false.
sk.IsAnomaly = false

if err := updateDatabaseMeasurementWithSummaryKeys(meas, sk); err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit 270dba5

Please sign in to comment.