pytest-argus-reporter 0.15.1__tar.gz → 0.15.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pytest_argus_reporter-0.15.1/pytest_argus_reporter.egg-info → pytest_argus_reporter-0.15.3}/PKG-INFO +1 -1
- {pytest_argus_reporter-0.15.1 → pytest_argus_reporter-0.15.3}/pyproject.toml +5 -1
- {pytest_argus_reporter-0.15.1 → pytest_argus_reporter-0.15.3/pytest_argus_reporter.egg-info}/PKG-INFO +1 -1
- {pytest_argus_reporter-0.15.1 → pytest_argus_reporter-0.15.3}/pytest_argus_reporter.egg-info/SOURCES.txt +0 -1
- {pytest_argus_reporter-0.15.1 → pytest_argus_reporter-0.15.3}/pytest_argus_reporter.py +5 -5
- pytest_argus_reporter-0.15.1/tests/test_int.py +0 -57
- {pytest_argus_reporter-0.15.1 → pytest_argus_reporter-0.15.3}/.envrc +0 -0
- {pytest_argus_reporter-0.15.1 → pytest_argus_reporter-0.15.3}/LICENSE +0 -0
- {pytest_argus_reporter-0.15.1 → pytest_argus_reporter-0.15.3}/MANIFEST.in +0 -0
- {pytest_argus_reporter-0.15.1 → pytest_argus_reporter-0.15.3}/README.md +0 -0
- {pytest_argus_reporter-0.15.1 → pytest_argus_reporter-0.15.3}/noxfile.py +0 -0
- {pytest_argus_reporter-0.15.1 → pytest_argus_reporter-0.15.3}/pytest_argus_reporter.egg-info/dependency_links.txt +0 -0
- {pytest_argus_reporter-0.15.1 → pytest_argus_reporter-0.15.3}/pytest_argus_reporter.egg-info/entry_points.txt +0 -0
- {pytest_argus_reporter-0.15.1 → pytest_argus_reporter-0.15.3}/pytest_argus_reporter.egg-info/requires.txt +0 -0
- {pytest_argus_reporter-0.15.1 → pytest_argus_reporter-0.15.3}/pytest_argus_reporter.egg-info/top_level.txt +0 -0
- {pytest_argus_reporter-0.15.1 → pytest_argus_reporter-0.15.3}/setup.cfg +0 -0
- {pytest_argus_reporter-0.15.1 → pytest_argus_reporter-0.15.3}/tests/conftest.py +0 -0
- {pytest_argus_reporter-0.15.1 → pytest_argus_reporter-0.15.3}/tests/test_argus_reporter.py +0 -0
- {pytest_argus_reporter-0.15.1 → pytest_argus_reporter-0.15.3}/tests/test_slices.py +0 -0
- {pytest_argus_reporter-0.15.1 → pytest_argus_reporter-0.15.3}/tests/test_xdist.py +0 -0
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
requires = [
|
|
3
3
|
"setuptools >= 40.0.4",
|
|
4
4
|
"wheel >= 0.29.0",
|
|
5
|
+
"setuptools-scm>=8",
|
|
5
6
|
]
|
|
6
7
|
build-backend = 'setuptools.build_meta'
|
|
7
8
|
|
|
8
9
|
[project]
|
|
9
10
|
name = "pytest-argus-reporter"
|
|
10
|
-
version = "0.15.1"
|
|
11
11
|
authors = [
|
|
12
12
|
{name = "Scylladb", email = "qa@scylladb.com"},
|
|
13
13
|
]
|
|
@@ -36,6 +36,10 @@ dependencies = [
|
|
|
36
36
|
"argus-alm",
|
|
37
37
|
"six >= 1.10.0",
|
|
38
38
|
]
|
|
39
|
+
dynamic = ["version",]
|
|
40
|
+
|
|
41
|
+
[tool.setuptools_scm]
|
|
42
|
+
root = ".."
|
|
39
43
|
|
|
40
44
|
[project.entry-points."pytest11"]
|
|
41
45
|
argus-reporter = "pytest_argus_reporter"
|
|
@@ -165,11 +165,12 @@ class ArgusReporter(object): # pylint: disable=too-many-instance-attributes
|
|
|
165
165
|
self.extra_headers = config.getoption("extra_headers")
|
|
166
166
|
self.max_splice_time = config.getoption("max_splice_time")
|
|
167
167
|
self.default_test_time = config.getoption("default_test_time")
|
|
168
|
+
if self.post_reports:
|
|
169
|
+
assert self.run_id and self.test_type, (
|
|
170
|
+
"'--argus-run-id' and '--argus-test-type' should be set, "
|
|
171
|
+
"or set ARGUS_RUN_ID and ARGUS_TEST_TYPE environment variables"
|
|
172
|
+
)
|
|
168
173
|
|
|
169
|
-
assert self.run_id and self.test_type, (
|
|
170
|
-
"'--argus-run-id' and '--argus-test-type' should be set, "
|
|
171
|
-
"or set ARGUS_RUN_ID and ARGUS_TEST_TYPE environment variables"
|
|
172
|
-
)
|
|
173
174
|
self.session_data = dict()
|
|
174
175
|
self.session_data["username"] = get_username()
|
|
175
176
|
self.session_data["hostname"] = socket.gethostname()
|
|
@@ -177,7 +178,6 @@ class ArgusReporter(object): # pylint: disable=too-many-instance-attributes
|
|
|
177
178
|
self.reports = defaultdict(list)
|
|
178
179
|
self.config = config
|
|
179
180
|
self.is_slave = False
|
|
180
|
-
|
|
181
181
|
self.slices_query_fields = dict()
|
|
182
182
|
|
|
183
183
|
@property
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import pytest
|
|
2
|
-
import json
|
|
3
|
-
import pytest
|
|
4
|
-
|
|
5
|
-
# filepath: pytest-argus-reporter/tests/test_pytest_argus_reporter.py
|
|
6
|
-
pytest_plugins = "pytester"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
def test_argus_reporter_integration_with_staging(testdir):
|
|
10
|
-
"""
|
|
11
|
-
Integration test for ArgusReporter with argus-staging environment.
|
|
12
|
-
"""
|
|
13
|
-
# Mock the Argus staging endpoint
|
|
14
|
-
# staging_url = "https://argus-staging.lab.dbaas.scyop.net/"
|
|
15
|
-
# api_key="g1JssdaLLL10tnYkChmnT1mZgQc9N/zJqdRw+UvQlfgYc9Sjzn2BhxhRfQH7EaLM"
|
|
16
|
-
|
|
17
|
-
# extra_headers = json.dumps({
|
|
18
|
-
# 'CF-Access-Client-Id': '6dc52d0d9bcd6b8d4fdab43fa5a1da9e.access',
|
|
19
|
-
# 'CF-Access-Client-Secret': '9bcd977bd9a54f49f299bd70b254d762cfba76b76848ac6c5730df921fed9264'
|
|
20
|
-
# })
|
|
21
|
-
|
|
22
|
-
# requests_mock.post(staging_url, status_code=201, text='{"status": "success"}')
|
|
23
|
-
|
|
24
|
-
testdir.makeconftest("""
|
|
25
|
-
from pytest_argus_reporter import ArgusReporter
|
|
26
|
-
|
|
27
|
-
def pytest_plugin_registered(plugin, manager):
|
|
28
|
-
if isinstance(plugin, ArgusReporter):
|
|
29
|
-
plugin.base_url = "https://argus-staging.lab.dbaas.scyop.net/"
|
|
30
|
-
plugin.api_key = "g1JssdaLLL10tnYkChmnT1mZgQc9N/zJqdRw+UvQlfgYc9Sjzn2BhxhRfQH7EaLM"
|
|
31
|
-
plugin.test_type = "dtest"
|
|
32
|
-
plugin.run_id = "d8b98921-4d85-4c72-bd06-32c2c7007438"
|
|
33
|
-
|
|
34
|
-
plugin.extra_headers = {
|
|
35
|
-
'CF-Access-Client-Id': '6dc52d0d9bcd6b8d4fdab43fa5a1da9e.access',
|
|
36
|
-
'CF-Access-Client-Secret': '9bcd977bd9a54f49f299bd70b254d762cfba76b76848ac6c5730df921fed9264'
|
|
37
|
-
}
|
|
38
|
-
""")
|
|
39
|
-
# Create a temporary pytest test module
|
|
40
|
-
testdir.makepyfile(
|
|
41
|
-
"""
|
|
42
|
-
def test_sample(request, argus_reporter):
|
|
43
|
-
argus_reporter.append_test_data(request, {"key": "value"})
|
|
44
|
-
assert True
|
|
45
|
-
"""
|
|
46
|
-
)
|
|
47
|
-
|
|
48
|
-
# Run pytest with ArgusReporter configured for staging
|
|
49
|
-
result = testdir.runpytest(
|
|
50
|
-
"--argus-post-reports",
|
|
51
|
-
"-v",
|
|
52
|
-
"-s",
|
|
53
|
-
)
|
|
54
|
-
|
|
55
|
-
# Assert the test passed
|
|
56
|
-
result.stdout.fnmatch_lines(["*::test_sample PASSED*"])
|
|
57
|
-
assert result.ret == 0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|