Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ coverage
/testdb.sql
venv
benchmarks/result*
coverage.xml
tests/python-agent-junit.xml
15 changes: 14 additions & 1 deletion docs/run-tests-locally.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <pip-cache-dir>
----
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

----
1 change: 1 addition & 0 deletions tests/client/client_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
6 changes: 5 additions & 1 deletion tests/scripts/download_json_schema.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down