ooni-probe-cli/E2E/miniooni.bash
Simone Basso 6125eb96a6
refactor: reorganize and to end and smoke testing (#348)
1. we can merge the e2eminiooni.yml test into the miniooni.yml test
so to reduce the number of tests we run;

2. ideally we would like the smoketest.sh test to evolve and also
check whether we can fetch the measurements we submitted, so start
moving this script into the `./E2E` folder, add a note saying we
would like to do that, and direct all the tests to run this script
at its new location and with its new name (`ooniprobe.sh`).

With these two changes, it's fine to remove the ooniprobe2debian.yml
test in ooni/e2etesting because we're moving its functionality to this
repository. (We mentioned the need to do this move in a previous TODO
comment at the top of such a script.)

Work part of https://github.com/ooni/probe/issues/1468
2021-05-13 18:04:47 +02:00

24 lines
678 B
Bash
Executable File

#!/bin/bash
#
# This script checks whether we're able to submit measurements to
# different backends using miniooni. It fails if we cannot find in
# the specific backend the measurement we submitted.
#
set -e
backends=()
backends+=( "https://ps1.ooni.io" )
backends+=( "https://dvp6h0xblpcqp.cloudfront.net" )
backends+=( "https://ams-pg-test.ooni.org" )
miniooni="${1:-./miniooni}"
for ps in ${backends[@]}; 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