-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit c2d4629 Author: Timothy Pansino <11214426+TimPansino@users.noreply.github.com> Date: Wed May 10 15:59:13 2023 -0700 Add required option for tox v4 (#795) * Add required option for tox v4 * Update tox in GHA * Remove py27 no-cache-dir commit a963649 Author: Hannah Stepanek <hstepanek@newrelic.com> Date: Tue May 9 10:46:39 2023 -0700 Run coverage around pytest (#813) * Run coverage around pytest * Trigger tests * Fixup * Add redis client_no_touch to ignore list * Temporarily remove kafka from coverage * Remove coverage for old libs commit 3d82845 Author: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com> Date: Wed May 3 14:50:30 2023 -0700 Omit some frameworks from coverage analysis (#810) * Omit some frameworks from coverage analysis * Remove commas * Change format of omit * Add relative_files option to coverage * Add absolute directory * Add envsitepackagedir * Add coveragerc file * Add codecov.yml * [Mega-Linter] Apply linters fixes * Revert coveragerc file settings * Add files in packages and more frameworks * Remove commented line --------- Co-authored-by: lrafeei <lrafeei@users.noreply.github.com> Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com> commit fd0fa35 Author: Uma Annamalai <uannamalai@newrelic.com> Date: Tue May 2 10:55:36 2023 -0700 Add testing for genshi and mako. (#799) * Add testing for genshi and mako. * [Mega-Linter] Apply linters fixes --------- Co-authored-by: umaannamalai <umaannamalai@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> commit be4fb3d Author: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com> Date: Mon May 1 16:01:09 2023 -0700 Add tests for Waitress (#797) * Change import format * Initial commit * Add more tests to adapter_waitress * Remove commented out code * [Mega-Linter] Apply linters fixes * Add assertions to all tests * Add more NR testing to waitress --------- Co-authored-by: lrafeei <lrafeei@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> commit 7103506 Author: Hannah Stepanek <hstepanek@newrelic.com> Date: Mon May 1 14:12:31 2023 -0700 Add tests for pyodbc (#796) * Add tests for pyodbc * Move imports into tests to get import coverage * Fixup: remove time import * Trigger tests --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> commit 363122a Author: Hannah Stepanek <hstepanek@newrelic.com> Date: Mon May 1 13:34:35 2023 -0700 Pin virtualenv, fix pip arg deprecation & disable kafka tests (#803) * Pin virtualenv * Fixup: use 20.21.1 instead * Replace install-options with config-settings See pypa/pip#11358. * Temporarily disable kafka tests
- Loading branch information
1 parent
dc81a50
commit 5e1cc9d
Showing
17 changed files
with
588 additions
and
266 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
ignore: | ||
- "newrelic/packages/**/*" | ||
- "newrelic/packages/*" | ||
- "newrelic/hooks/adapter_meinheld.py" | ||
- "newrelic/hooks/adapter_flup.py" | ||
- "newrelic/hooks/component_piston.py" | ||
- "newrelic/hooks/datastore_pyelasticsearch.py" | ||
- "newrelic/hooks/external_pywapi.py" | ||
- "newrelic/hooks/external_dropbox.py" | ||
- "newrelic/hooks/external_facepy.py" | ||
- "newrelic/hooks/external_xmlrpclib.py" | ||
- "newrelic/hooks/framework_pylons.py" | ||
- "newrelic/hooks/framework_web2py.py" | ||
- "newrelic/hooks/middleware_weberror.py" | ||
- "newrelic/hooks/framework_webpy.py" | ||
- "newrelic/hooks/database_oursql.py" | ||
- "newrelic/hooks/database_psycopg2ct.py" | ||
- "newrelic/hooks/datastore_umemcache.py" | ||
# Temporarily disable kafka | ||
- "newrelic/hooks/messagebroker_kafkapython.py" | ||
- "newrelic/hooks/messagebroker_confluentkafka.py" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Copyright 2010 New Relic, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
from threading import Thread | ||
from time import sleep | ||
|
||
from testing_support.sample_applications import ( | ||
raise_exception_application, | ||
raise_exception_finalize, | ||
raise_exception_response, | ||
simple_app_raw, | ||
) | ||
from testing_support.util import get_open_port | ||
|
||
|
||
def sample_application(environ, start_response): | ||
path_info = environ.get("PATH_INFO") | ||
|
||
if path_info.startswith("/raise-exception-application"): | ||
return raise_exception_application(environ, start_response) | ||
elif path_info.startswith("/raise-exception-response"): | ||
return raise_exception_response(environ, start_response) | ||
elif path_info.startswith("/raise-exception-finalize"): | ||
return raise_exception_finalize(environ, start_response) | ||
|
||
return simple_app_raw(environ, start_response) | ||
|
||
|
||
def setup_application(): | ||
port = get_open_port() | ||
|
||
def run_wsgi(): | ||
from waitress import serve | ||
|
||
serve(sample_application, host="127.0.0.1", port=port) | ||
|
||
wsgi_thread = Thread(target=run_wsgi) | ||
wsgi_thread.daemon = True | ||
wsgi_thread.start() | ||
|
||
sleep(1) | ||
|
||
return port |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Copyright 2010 New Relic, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import pytest | ||
import webtest | ||
from testing_support.fixtures import ( # noqa: F401; pylint: disable=W0611 | ||
collector_agent_registration_fixture, | ||
collector_available_fixture, | ||
) | ||
|
||
_default_settings = { | ||
"transaction_tracer.explain_threshold": 0.0, | ||
"transaction_tracer.transaction_threshold": 0.0, | ||
"transaction_tracer.stack_trace_threshold": 0.0, | ||
"debug.log_data_collector_payloads": True, | ||
"debug.record_transaction_failure": True, | ||
} | ||
|
||
collector_agent_registration = collector_agent_registration_fixture( | ||
app_name="Python Agent Test (Waitress)", default_settings=_default_settings | ||
) | ||
|
||
|
||
@pytest.fixture(autouse=True, scope="session") | ||
def target_application(): | ||
import _application | ||
|
||
port = _application.setup_application() | ||
return webtest.TestApp("http://localhost:%d" % port) |
Oops, something went wrong.