fix(webconnectivity): pass TestHelpers to measurement (#736)

* Passed the TestHelpers field to RunAsyc and MeasureAsync. This reflects the test_helpers in the measurement.

* Spec already contains the correct output.

See  https://github.com/ooni/probe/issues/2073

Co-authored-by: decfox <decfox>
This commit is contained in:
DecFox 2022-05-18 19:16:08 +05:30 committed by GitHub
parent 143fd498d5
commit cced980387
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -131,6 +131,7 @@ func (eaw *experimentAsyncWrapper) RunAsync(
Input: measurement.Input,
MeasurementRuntime: stop.Sub(start).Seconds(),
TestKeys: measurement.TestKeys,
TestHelpers: measurement.TestHelpers,
}
}()
return out, nil
@ -180,6 +181,7 @@ func (e *Experiment) MeasureAsync(
measurement.Extensions = tk.Extensions
measurement.Input = tk.Input
measurement.MeasurementRuntime = tk.MeasurementRuntime
measurement.TestHelpers = tk.TestHelpers
measurement.TestKeys = tk.TestKeys
if err := measurement.Scrub(e.session.ProbeIP()); err != nil {
// If we fail to scrub the measurement then we are not going to

View File

@ -39,6 +39,9 @@ type ExperimentAsyncTestKeys struct {
// MeasurementRuntime is the total measurement runtime.
MeasurementRuntime float64
// TestHelpers contains the test helpers used in the experiment
TestHelpers map[string]interface{}
// TestKeys contains the actual test keys.
TestKeys interface{}
}