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
This commit is contained in:
Simone Basso
2021-05-13 18:04:47 +02:00
committed by GitHub
parent c95a2b12fb
commit 6125eb96a6
9 changed files with 38 additions and 40 deletions
+14 -9
View File
@@ -1,16 +1,21 @@
#!/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
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
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
$miniooni --yes $opt -i http://mail.google.com web_connectivity
$miniooni --yes $opt tor
$miniooni --yes $opt psiphon
set +x
done
set -x
+16
View File
@@ -0,0 +1,16 @@
#!/bin/sh
#
# This test for now uses --no-collector and we just ensure that the OONI
# instance is not exploding. We are confident that, if miniooni submits
# measurements, also ooniprobe should be able to do that. However, it would
# actually be nice if someone could enhance this script to also make sure
# that we can actually fetch the measurements we submit.
#
set -ex
if [ "$#" != 1 ]; then
echo "Usage: $0 <binary>" 1>&2
exit 1
fi
$1 onboard --yes
# Important! DO NOT run performance from CI b/c it will overload m-lab servers
$1 run websites --config cmd/ooniprobe/testdata/testing-config.json --no-collector