ooni-probe-cli/config/parser_test.go
2018-09-13 11:02:49 +02:00

20 lines
380 B
Go

package config
import (
"testing"
)
func TestParseConfig(t *testing.T) {
config, err := ReadConfig("testdata/valid-config.json")
if err != nil {
t.Error(err)
}
if len(config.NettestGroups.Middlebox.EnabledTests) < 0 {
t.Error("at least one middlebox test should be enabled")
}
if config.Sharing.IncludeCountry == false {
t.Error("country should be included")
}
}