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:
@@ -0,0 +1 @@
|
||||
/*.jsonl
|
||||
@@ -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.
|
||||
Executable
+18
@@ -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
|
||||
Reference in New Issue
Block a user