feat: add end-to-end testing to this repository (#220)

* feat: add end-to-end testing to this repository

Part of https://github.com/ooni/probe-engine/issues/1181

Motivation: we want to run this check from the repository where
we work the most, such that it's unlikely it pauses due to inactivity,
as it may happen for less frequently touched upon repositories.

Code adapted from https://github.com/ooni/e2etesting/

* fix: correct name for main branch
This commit is contained in:
Simone Basso
2021-02-04 14:25:03 +01:00
committed by GitHub
parent 26d807c50f
commit f53b3be66e
5 changed files with 123 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
/*.jsonl
+4
View File
@@ -0,0 +1,4 @@
# github.com/ooni/probe-cli/E2E
This directory is used to run end-to-end tests where we run specific
measurements, we fetch them back from the API, and check them.
+18
View File
@@ -0,0 +1,18 @@
#!/bin/bash
set -e
go build -v ./internal/cmd/miniooni
probeservices=()
probeservices+=( "https://ps1.ooni.io" )
probeservices+=( "https://dvp6h0xblpcqp.cloudfront.net" )
probeservices+=( "https://ams-pg-test.ooni.org" )
for ps in ${probeservices[@]}; do
opt="-o E2E/o.jsonl --probe-services=$ps"
set -x
./miniooni --yes $opt -i http://mail.google.com web_connectivity
./miniooni --yes $opt tor
./miniooni --yes $opt psiphon
set +x
done
set -x
go run ./internal/cmd/e2epostprocess -expected 9
set +x