Upgrade to probe-engine@v0.13.0 and fix Psiphon logic (#138)

* go.mod go.sum: pin to ooni/probe-engine@v0.13.0, update all other deps

Make sure dependencies of probe-engine are at the same exact version to
which is probe-engine, to avoid any possible issue.

* Readme.md: clarify the procedure for updating deps
This commit is contained in:
Simone Basso
2020-06-15 14:57:00 +02:00
committed by GitHub
parent b4934b1619
commit ef4b1aee76
4 changed files with 36 additions and 30 deletions
+7 -7
View File
@@ -27,22 +27,22 @@ type PsiphonTestKeys struct {
// GetTestKeys generates a summary for a test run
func (h Psiphon) GetTestKeys(tk map[string]interface{}) (interface{}, error) {
var (
err error
ok bool
ok bool
testKeys PsiphonTestKeys
)
testKeys := PsiphonTestKeys{IsAnomaly: false, Failure: ""}
if tk["failure"] != nil {
testKeys.IsAnomaly = true
testKeys.Failure, ok = tk["failure"].(string)
failure, ok := tk["failure"].(*string)
if !ok {
err = errors.Wrap(err, "failure key invalid")
return testKeys, errors.New("failure key invalid")
}
testKeys.Failure = *failure
}
testKeys.BootstrapTime, ok = tk["bootstrap_time"].(float64)
if !ok {
err = errors.Wrap(err, "bootstrap_time key invalid")
return testKeys, errors.New("bootstrap_time key invalid")
}
return testKeys, err
return testKeys, nil
}
// LogSummary writes the summary to the standard output