Fix import for groups

This commit is contained in:
Arturo Filastò 2019-12-02 18:05:02 +02:00
parent b7deb6c88f
commit 274e533b2e

View File

@ -11,11 +11,10 @@ import (
"github.com/ooni/probe-cli/internal/cli/root"
"github.com/ooni/probe-cli/internal/database"
"github.com/ooni/probe-cli/nettests"
"github.com/ooni/probe-cli/nettests/groups"
)
func runNettestGroup(tg string, ctx *ooni.Context, network *database.Network) error {
group, ok := groups.NettestGroups[tg]
group, ok := nettests.NettestGroups[tg]
if !ok {
log.Errorf("No test group named %s", tg)
return errors.New("invalid test group name")
@ -51,7 +50,7 @@ func init() {
var ctx *ooni.Context
var network *database.Network
for name := range groups.NettestGroups {
for name := range nettests.NettestGroups {
nettestGroupNamesBlue = append(nettestGroupNamesBlue, color.BlueString(name))
}
@ -130,7 +129,7 @@ func init() {
allCmd := cmd.Command("all", "").Default()
allCmd.Action(func(_ *kingpin.ParseContext) error {
log.Infof("Running %s tests", color.BlueString("all"))
for tg := range groups.NettestGroups {
for tg := range nettests.NettestGroups {
if err := runNettestGroup(tg, ctx, network); err != nil {
log.WithError(err).Errorf("failed to run %s", tg)
}