Remove all settings which are not implemented (#73)

* Remove all settings which are not implemented

* Add support for migrating config files from version 0 -> 1

Add basic unittests for the config file migration

* Update the config file used by travis

* Fix typos in console log messages

* Improve the comment

* Fix type of limit

* Set informed consent to true in the travis config
This commit is contained in:
Arturo Filastò 2019-11-14 17:58:31 +01:00 committed by GitHub
commit 8a27de6c7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 197 additions and 264 deletions

View file

@ -6,11 +6,11 @@ import (
"github.com/ooni/probe-cli/nettests"
)
func lookupURLs(ctl *nettests.Controller, limit int) ([]string, map[int64]int64, error) {
func lookupURLs(ctl *nettests.Controller, limit int64) ([]string, map[int64]int64, error) {
var urls []string
urlIDMap := make(map[int64]int64)
config := ctl.Ctx.Session.NewTestListsConfig()
config.Limit = limit
config.Limit = int(limit)
client := ctl.Ctx.Session.NewTestListsClient()
testlist, err := client.Fetch(config)
if err != nil {
@ -38,7 +38,7 @@ type WebConnectivity struct {
// Run starts the test
func (n WebConnectivity) Run(ctl *nettests.Controller) error {
urls, urlIDMap, err := lookupURLs(ctl, ctl.Ctx.Config.NettestGroups.Websites.Limit)
urls, urlIDMap, err := lookupURLs(ctl, ctl.Ctx.Config.Nettests.WebsitesURLLimit)
if err != nil {
return err
}