feat: implement the unattended group (#183)

We don't want to run performance in the background because this
causes too much traffic towards m-lab servers.

When we'll have the check-in API, this will be the entry point we'll
use to contact such an API and get things to do.

Part of https://github.com/ooni/probe/issues/1289.
This commit is contained in:
Simone Basso 2020-12-01 16:52:12 +01:00 committed by GitHub
commit d402cd9090
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 50 additions and 51 deletions

View file

@ -1,18 +1,20 @@
package nettests
// NettestGroup base structure
type NettestGroup struct {
Label string
Nettests []Nettest
// Group is a group of nettests
type Group struct {
Label string
Nettests []Nettest
UnattendedOK bool
}
// NettestGroups that can be run by the user
var NettestGroups = map[string]NettestGroup{
// All contains all the nettests that can be run by the user
var All = map[string]Group{
"websites": {
Label: "Websites",
Nettests: []Nettest{
WebConnectivity{},
},
UnattendedOK: true,
},
"performance": {
Label: "Performance",
@ -27,6 +29,7 @@ var NettestGroups = map[string]NettestGroup{
HTTPInvalidRequestLine{},
HTTPHeaderFieldManipulation{},
},
UnattendedOK: true,
},
"im": {
Label: "Instant Messaging",
@ -35,6 +38,7 @@ var NettestGroups = map[string]NettestGroup{
Telegram{},
WhatsApp{},
},
UnattendedOK: true,
},
"circumvention": {
Label: "Circumvention Tools",
@ -42,5 +46,6 @@ var NettestGroups = map[string]NettestGroup{
Psiphon{},
Tor{},
},
UnattendedOK: true,
},
}