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:
Simone Basso
2022-04-29 13:41:09 +02:00
committed by GitHub
parent 596bdf6e57
commit d3c5196474
19 changed files with 72 additions and 37 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ type OOAPICheckInConfig struct {
Platform string `json:"platform"` // Platform of the probe
ProbeASN string `json:"probe_asn"` // ProbeASN is the probe country code
ProbeCC string `json:"probe_cc"` // ProbeCC is the probe country code
RunType string `json:"run_type"` // RunType
RunType RunType `json:"run_type"` // RunType
SoftwareName string `json:"software_name"` // SoftwareName of the probe
SoftwareVersion string `json:"software_version"` // SoftwareVersion of the probe
WebConnectivity OOAPICheckInConfigWebConnectivity `json:"web_connectivity"` // WebConnectivity class contain an array of categories
+14
View File
@@ -0,0 +1,14 @@
package model
// RunType describes the type of a ooniprobe run.
type RunType string
const (
// RunTypeManual indicates that the user manually run `ooniprobe run`. Command
// line tools such as miniooni should always use this run type.
RunTypeManual = RunType("manual")
// RunTypeTimed indicates that the user run `ooniprobe run unattended`, which
// is the correct way to run ooniprobe from scripts and cronjobs.
RunTypeTimed = RunType("timed")
)