Fix import for groups
This commit is contained in:
parent
b7deb6c88f
commit
274e533b2e
@ -11,11 +11,10 @@ import (
|
|||||||
"github.com/ooni/probe-cli/internal/cli/root"
|
"github.com/ooni/probe-cli/internal/cli/root"
|
||||||
"github.com/ooni/probe-cli/internal/database"
|
"github.com/ooni/probe-cli/internal/database"
|
||||||
"github.com/ooni/probe-cli/nettests"
|
"github.com/ooni/probe-cli/nettests"
|
||||||
"github.com/ooni/probe-cli/nettests/groups"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func runNettestGroup(tg string, ctx *ooni.Context, network *database.Network) error {
|
func runNettestGroup(tg string, ctx *ooni.Context, network *database.Network) error {
|
||||||
group, ok := groups.NettestGroups[tg]
|
group, ok := nettests.NettestGroups[tg]
|
||||||
if !ok {
|
if !ok {
|
||||||
log.Errorf("No test group named %s", tg)
|
log.Errorf("No test group named %s", tg)
|
||||||
return errors.New("invalid test group name")
|
return errors.New("invalid test group name")
|
||||||
@ -51,7 +50,7 @@ func init() {
|
|||||||
var ctx *ooni.Context
|
var ctx *ooni.Context
|
||||||
var network *database.Network
|
var network *database.Network
|
||||||
|
|
||||||
for name := range groups.NettestGroups {
|
for name := range nettests.NettestGroups {
|
||||||
nettestGroupNamesBlue = append(nettestGroupNamesBlue, color.BlueString(name))
|
nettestGroupNamesBlue = append(nettestGroupNamesBlue, color.BlueString(name))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -130,7 +129,7 @@ func init() {
|
|||||||
allCmd := cmd.Command("all", "").Default()
|
allCmd := cmd.Command("all", "").Default()
|
||||||
allCmd.Action(func(_ *kingpin.ParseContext) error {
|
allCmd.Action(func(_ *kingpin.ParseContext) error {
|
||||||
log.Infof("Running %s tests", color.BlueString("all"))
|
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 {
|
if err := runNettestGroup(tg, ctx, network); err != nil {
|
||||||
log.WithError(err).Errorf("failed to run %s", tg)
|
log.WithError(err).Errorf("failed to run %s", tg)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user