refactor: nettests is now an internal package (#165)

I'm moving everything into internal packages since this ain't a library.

While there, remove typo that was causing a build breakage.
This commit is contained in:
Simone Basso 2020-11-13 17:14:26 +01:00 committed by GitHub
parent fb2ca32004
commit a58dff3050
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 2 additions and 3 deletions

View File

@ -10,7 +10,7 @@ import (
"github.com/ooni/probe-cli/internal/cli/onboard"
"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/internal/nettests"
)
func runNettestGroup(tg string, ctx *ooni.Context, network *database.Network) error {

View File

@ -84,7 +84,6 @@ func makeSummary(name string, totalCount uint64, anomalyCount uint64, ss string)
func logResultItem(w io.Writer, f log.Fields) error {
colWidth := 24
Try running
rID := f.Get("id").(int64)
name := f.Get("name").(string)
isDone := f.Get("is_done").(bool)

View File

@ -16,7 +16,7 @@ func newTestingContext(t *testing.T) *ooni.Context {
t.Fatal(err)
}
configPath := path.Join(homePath, "config.json")
testingConfig := path.Join("..", "testdata", "testing-config.json")
testingConfig := path.Join("..", "..", "testdata", "testing-config.json")
shutil.Copy(testingConfig, configPath, false)
ctx := ooni.NewContext(configPath, homePath)
swName := "ooniprobe-cli-tests"