fix(engine): repair broken integration test (#841)

The integration test that was broken was:

```
--- FAIL: TestCreateInvalidExperiment (0.35s)
    experiment_integration_test.go:192: expected a nil builder here
```

While there improve the documentation of the ExperimentSession
and see there's a method that we are not using.

This diff is a cleanup that I come up with while working
on https://github.com/ooni/probe/issues/2184.
This commit is contained in:
Simone Basso 2022-07-08 13:12:12 +02:00 committed by GitHub
commit e5697e641e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 7 deletions

View file

@ -391,7 +391,11 @@ var ErrAlreadyUsingProxy = errors.New(
// for the experiment with the given name, or an error if
// there's no such experiment with the given name
func (s *Session) NewExperimentBuilder(name string) (ExperimentBuilder, error) {
return newExperimentBuilder(s, name)
eb, err := newExperimentBuilder(s, name)
if err != nil {
return nil, err
}
return eb, nil
}
// NewProbeServicesClient creates a new client for talking with the