From 47dd063b7706f1c028cec64cb6f597d41f299e4b Mon Sep 17 00:00:00 2001 From: Simone Basso Date: Tue, 2 Feb 2021 14:18:22 +0100 Subject: [PATCH] fix: add missing files causing tests to fail (#202) * fix: add missing files causing tests to fail See https://github.com/ooni/probe/issues/1335#issuecomment-771559718 * fix: toggle verbose so we better understand the tests output --- .github/workflows/golang.yml | 2 +- .gitignore | 19 ++++++++++--------- internal/engine/MOBILE/android/.gitignore | 1 + internal/engine/MOBILE/ios/.gitignore | 1 + .../engine/internal/fsx/testdata/.gitignore | 1 + .../engine/internal/fsx/testdata/testfile.txt | 1 + .../internal/psiphonx/private/.gitignore | 1 + internal/engine/resources/private/.gitignore | 2 ++ .../engine/testdata/collector-expected.jsonl | 1 + 9 files changed, 19 insertions(+), 10 deletions(-) create mode 100644 internal/engine/MOBILE/android/.gitignore create mode 100644 internal/engine/MOBILE/ios/.gitignore create mode 100644 internal/engine/internal/fsx/testdata/.gitignore create mode 100644 internal/engine/internal/fsx/testdata/testfile.txt create mode 100644 internal/engine/internal/psiphonx/private/.gitignore create mode 100644 internal/engine/resources/private/.gitignore create mode 100644 internal/engine/testdata/collector-expected.jsonl diff --git a/.github/workflows/golang.yml b/.github/workflows/golang.yml index 52ee6d5..390809d 100644 --- a/.github/workflows/golang.yml +++ b/.github/workflows/golang.yml @@ -18,7 +18,7 @@ jobs: with: go-version: ${{ matrix.go }} - uses: actions/checkout@v2 - - run: go test -race -tags shaping -v -coverprofile=probe-cli.cov -coverpkg=./... ./... + - run: go test -race -tags shaping -coverprofile=probe-cli.cov -coverpkg=./... ./... - uses: shogo82148/actions-goveralls@v1 with: path-to-profile: probe-cli.cov diff --git a/.gitignore b/.gitignore index 1565ee6..2cab8da 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,11 @@ -/ooniprobe.exe -/ooniprobe -/coverage.cov -/testdata/gotmp -*.jsonl .DS_Store -*.tar.gz -*.zip -ooniprobe_checksums.txt -ooniprobe_checksums.txt.asc +/*.jsonl +/*.tar.gz +/*.zip +/coverage.cov +/ooniprobe +/ooniprobe.exe +/ooniprobe_checksums.txt +/ooniprobe_checksums.txt.asc +/probe-cli.cov +/testdata/gotmp diff --git a/internal/engine/MOBILE/android/.gitignore b/internal/engine/MOBILE/android/.gitignore new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/internal/engine/MOBILE/android/.gitignore @@ -0,0 +1 @@ + diff --git a/internal/engine/MOBILE/ios/.gitignore b/internal/engine/MOBILE/ios/.gitignore new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/internal/engine/MOBILE/ios/.gitignore @@ -0,0 +1 @@ + diff --git a/internal/engine/internal/fsx/testdata/.gitignore b/internal/engine/internal/fsx/testdata/.gitignore new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/internal/engine/internal/fsx/testdata/.gitignore @@ -0,0 +1 @@ + diff --git a/internal/engine/internal/fsx/testdata/testfile.txt b/internal/engine/internal/fsx/testdata/testfile.txt new file mode 100644 index 0000000..c3d535b --- /dev/null +++ b/internal/engine/internal/fsx/testdata/testfile.txt @@ -0,0 +1 @@ +my test input \ No newline at end of file diff --git a/internal/engine/internal/psiphonx/private/.gitignore b/internal/engine/internal/psiphonx/private/.gitignore new file mode 100644 index 0000000..a924440 --- /dev/null +++ b/internal/engine/internal/psiphonx/private/.gitignore @@ -0,0 +1 @@ +/psiphon.gz diff --git a/internal/engine/resources/private/.gitignore b/internal/engine/resources/private/.gitignore new file mode 100644 index 0000000..9f7c7ac --- /dev/null +++ b/internal/engine/resources/private/.gitignore @@ -0,0 +1,2 @@ +/asn.mmdb.gz +/country.mmdb.gz diff --git a/internal/engine/testdata/collector-expected.jsonl b/internal/engine/testdata/collector-expected.jsonl new file mode 100644 index 0000000..7f9af5f --- /dev/null +++ b/internal/engine/testdata/collector-expected.jsonl @@ -0,0 +1 @@ +{"format":"json","content":{"data_format_version":"0.2.0","id":"bdd20d7a-bba5-40dd-a111-9863d7908572","input":null,"measurement_start_time":"2018-11-01 15:33:20","probe_asn":"AS0","probe_cc":"ZZ","probe_ip":"1.2.3.4","probe_network_name":"","report_id":"_id","resolver_asn":"AS15169","resolver_ip":"8.8.8.8","resolver_network_name":"Google LLC","software_name":"ooniprobe-engine","software_version":"0.1.0","test_keys":{"failure":null},"test_name":"dummy","test_runtime":5.0565230846405,"test_start_time":"2018-11-01 15:33:17","test_version":"0.1.0"}} \ No newline at end of file