diff --git a/.gitignore b/.gitignore index 78c9ce53c..b761d5fe6 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,5 @@ coverage /testdb.sql venv benchmarks/result* +coverage.xml +tests/python-agent-junit.xml diff --git a/docs/run-tests-locally.asciidoc b/docs/run-tests-locally.asciidoc index cacf71a6e..fa424d71d 100644 --- a/docs/run-tests-locally.asciidoc +++ b/docs/run-tests-locally.asciidoc @@ -55,5 +55,18 @@ We run the test suite on different combinations of Python versions and web frame ---- $ ./tests/scripts/docker/run_tests.sh python-version framework-version ---- -NOTE: The `python-version` must be of format `python:version`, e.g. `python:3.6` or `pypy:2`. +NOTE: The `python-version` must be of format `python-version`, e.g. `python-3.6` or `pypy-2`. The `framework` must be of format `framework-version`, e.g. `django-1.10` or `flask-0.12`. + +==== Integration testing + +Check out https://github.com/elastic/apm-integration-testing for resources for +setting up full end-to-end testing environments. For example, to spin up +an environment with the https://github.com/basepi/opbeans-python[opbeans Django app], +with version 7.3 of the elastic stack and the apm-python-agent from your local +checkout, you might do something like this: + +[source,bash] +---- +$ ./scripts/compose.py start 7.3 --with-agent-python-django --with-opbeans-python --opbeans-python-agent-local-repo=~/elastic/apm-agent-python
 +---- diff --git a/tests/client/client_tests.py b/tests/client/client_tests.py index 55ff9ffde..50320942b 100644 --- a/tests/client/client_tests.py +++ b/tests/client/client_tests.py @@ -250,6 +250,7 @@ def test_send_remote_failover_sync_non_transport_exception_error(should_try, htt secret_token="secret", transport_class="elasticapm.transport.http.Transport", metrics_interval="0ms", + metrics_sets=[], ) # test error http_send.side_effect = ValueError("oopsie") diff --git a/tests/scripts/download_json_schema.sh b/tests/scripts/download_json_schema.sh index dd5fa5199..88299b7fb 100644 --- a/tests/scripts/download_json_schema.sh +++ b/tests/scripts/download_json_schema.sh @@ -7,7 +7,11 @@ download_schema() rm -rf ${1} && mkdir -p ${1} for run in 1 2 3 4 5 do - curl --silent --fail https://codeload.github.com/elastic/apm-server/tar.gz/${2} | tar xzvf - --wildcards --directory=${1} --strip-components=1 "*/docs/spec/*" + if [ -x "$(command -v gtar)" ]; then + curl --silent --fail https://codeload.github.com/elastic/apm-server/tar.gz/${2} | gtar xzvf - --wildcards --directory=${1} --strip-components=1 "*/docs/spec/*" + else + curl --silent --fail https://codeload.github.com/elastic/apm-server/tar.gz/${2} | tar xzvf - --wildcards --directory=${1} --strip-components=1 "*/docs/spec/*" + fi result=$? if [ $result -eq 0 ]; then break; fi sleep 1