fix(E2E): ensure miniooni.bash is WAI (#972)
This diff re-enables `E2E/miniooni.bash`. To make it working properly, we needed to figure out which were the right cloudfronts to use. I looked into the configuration and determined that both cloudfronts should be used because they basically map to the same host. I also determined it was backwards to test a mixture of prod and testing APIs, and probably also flaky. So, I choose to only test the prod. Additionally, I added support for testing all supported tunnels. Closes https://github.com/ooni/probe/issues/2336
This commit is contained in:
@@ -29,7 +29,7 @@ func newclient() probeservices.Client {
|
||||
ua := fmt.Sprintf("apitool/%s ooniprobe-engine/%s", version.Version, version.Version)
|
||||
return probeservices.Client{
|
||||
APIClientTemplate: httpx.APIClientTemplate{
|
||||
BaseURL: "https://api.ooni.io/",
|
||||
BaseURL: *backend,
|
||||
HTTPClient: &http.Client{Transport: txp},
|
||||
Logger: log.Log,
|
||||
UserAgent: ua,
|
||||
@@ -50,6 +50,7 @@ func fatalOnError(err error, message string) {
|
||||
}
|
||||
|
||||
var (
|
||||
backend = flag.String("backend", "https://api.ooni.io/", "Backend to use")
|
||||
debug = flag.Bool("v", false, "Enable verbose mode")
|
||||
input = flag.String("input", "", "Input of the measurement")
|
||||
mode = flag.String("mode", "", "One of: check, meta, raw")
|
||||
|
||||
@@ -27,6 +27,7 @@ type Measurement struct {
|
||||
}
|
||||
|
||||
func main() {
|
||||
backend := flag.String("backend", "https://api.ooni.io/", "Backend to use")
|
||||
expected := flag.Int("expected", 0, "Expected number of measurement files")
|
||||
flag.Parse()
|
||||
if *expected <= 0 {
|
||||
@@ -61,6 +62,7 @@ func main() {
|
||||
options := []string{
|
||||
"run",
|
||||
"./internal/cmd/apitool",
|
||||
"-backend", *backend,
|
||||
"-mode", "meta",
|
||||
"-report-id", entry.ReportID,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user