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
commit f53b3be66e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 123 additions and 0 deletions

18
E2E/miniooni.bash Executable file
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