Implement the show command (#53)
This commit is contained in:
committed by
Simone Basso
parent
b9b555ba68
commit
f425d3f007
@@ -10,11 +10,11 @@ import (
|
||||
"github.com/ooni/probe-engine/orchestra/testlists"
|
||||
)
|
||||
|
||||
func lookupURLs(ctl *nettests.Controller) ([]string, map[int64]int64, error) {
|
||||
func lookupURLs(ctl *nettests.Controller, limit int) ([]string, map[int64]int64, error) {
|
||||
var urls []string
|
||||
urlIDMap := make(map[int64]int64)
|
||||
testlist, err := testlists.NewClient(ctl.Ctx.Session).Do(
|
||||
context.Background(), ctl.Ctx.Session.ProbeCC(),
|
||||
context.Background(), ctl.Ctx.Session.ProbeCC(), limit,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
@@ -41,7 +41,7 @@ type WebConnectivity struct {
|
||||
|
||||
// Run starts the test
|
||||
func (n WebConnectivity) Run(ctl *nettests.Controller) error {
|
||||
urls, urlIDMap, err := lookupURLs(ctl)
|
||||
urls, urlIDMap, err := lookupURLs(ctl, ctl.Ctx.Config.NettestGroups.Websites.Limit)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user