fix(ooniprobe): use ooniprobe-cli-unattended for unattended runs (#714)
This diff changes the software name used by unattended runs for which we did not override the default software name (`ooniprobe-cli`). It will become `ooniprobe-cli-unattended`. This software name is in line with the one we use for Android, iOS, and desktop unattended runs. While working in this diff, I introduced string constants for the run types and a string constant for the default software name. See https://github.com/ooni/probe/issues/2081.
This commit is contained in:
parent
596bdf6e57
commit
d3c5196474
19 changed files with 72 additions and 37 deletions
|
|
@ -8,6 +8,7 @@ import (
|
|||
"github.com/apex/log"
|
||||
"github.com/ooni/probe-cli/v3/cmd/ooniprobe/internal/database"
|
||||
"github.com/ooni/probe-cli/v3/cmd/ooniprobe/internal/ooni"
|
||||
"github.com/ooni/probe-cli/v3/internal/model"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
|
|
@ -17,7 +18,7 @@ type RunGroupConfig struct {
|
|||
InputFiles []string
|
||||
Inputs []string
|
||||
Probe *ooni.Probe
|
||||
RunType string // hint for check-in API
|
||||
RunType model.RunType // hint for check-in API
|
||||
}
|
||||
|
||||
const websitesURLLimitRemoved = `WARNING: CONFIGURATION CHANGE REQUIRED:
|
||||
|
|
@ -58,7 +59,7 @@ func RunGroup(config RunGroupConfig) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
sess, err := config.Probe.NewSession(context.Background())
|
||||
sess, err := config.Probe.NewSession(context.Background(), config.RunType)
|
||||
if err != nil {
|
||||
log.WithError(err).Error("Failed to create a measurement session")
|
||||
return err
|
||||
|
|
|
|||
Loading…
Reference in a new issue