refactor(engine): scrub the whole measurement (#956)

Part of https://github.com/ooni/probe/issues/2297
This commit is contained in:
Simone Basso 2022-09-12 22:22:25 +02:00 committed by GitHub
commit 1638c450f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 89 additions and 90 deletions

View file

@ -139,7 +139,7 @@ func (e *experiment) MeasureAsync(
measurement.MeasurementRuntime = tk.MeasurementRuntime
measurement.TestHelpers = tk.TestHelpers
measurement.TestKeys = tk.TestKeys
if err := measurement.Scrub(e.session.ProbeIP()); err != nil {
if err := model.ScrubMeasurement(measurement, e.session.ProbeIP()); err != nil {
// If we fail to scrub the measurement then we are not going to
// submit it. Most likely causes of error here are unlikely,
// e.g., the TestKeys being not serializable.