testit-cli 2.9.0__tar.gz → 2.9.1__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.
- {testit_cli-2.9.0 → testit_cli-2.9.1}/PKG-INFO +2 -1
- {testit_cli-2.9.0 → testit_cli-2.9.1}/README.md +1 -0
- {testit_cli-2.9.0 → testit_cli-2.9.1}/setup.py +1 -1
- {testit_cli-2.9.0 → testit_cli-2.9.1}/src/testit_cli/apiclient.py +5 -1
- testit_cli-2.9.1/src/testit_cli/http_retry.py +32 -0
- {testit_cli-2.9.0 → testit_cli-2.9.1}/src/testit_cli.egg-info/PKG-INFO +2 -1
- {testit_cli-2.9.0 → testit_cli-2.9.1}/src/testit_cli.egg-info/SOURCES.txt +1 -0
- {testit_cli-2.9.0 → testit_cli-2.9.1}/LICENSE +0 -0
- {testit_cli-2.9.0 → testit_cli-2.9.1}/setup.cfg +0 -0
- {testit_cli-2.9.0 → testit_cli-2.9.1}/src/testit_cli/__init__.py +0 -0
- {testit_cli-2.9.0 → testit_cli-2.9.1}/src/testit_cli/__main__.py +0 -0
- {testit_cli-2.9.0 → testit_cli-2.9.1}/src/testit_cli/autotests_filter.py +0 -0
- {testit_cli-2.9.0 → testit_cli-2.9.1}/src/testit_cli/click_commands.py +0 -0
- {testit_cli-2.9.0 → testit_cli-2.9.1}/src/testit_cli/converter.py +0 -0
- {testit_cli-2.9.0 → testit_cli-2.9.1}/src/testit_cli/dir_worker.py +0 -0
- {testit_cli-2.9.0 → testit_cli-2.9.1}/src/testit_cli/file_worker.py +0 -0
- {testit_cli-2.9.0 → testit_cli-2.9.1}/src/testit_cli/filter_factory.py +0 -0
- {testit_cli-2.9.0 → testit_cli-2.9.1}/src/testit_cli/html_escape_utils.py +0 -0
- {testit_cli-2.9.0 → testit_cli-2.9.1}/src/testit_cli/importer.py +0 -0
- {testit_cli-2.9.0 → testit_cli-2.9.1}/src/testit_cli/logger.py +0 -0
- {testit_cli-2.9.0 → testit_cli-2.9.1}/src/testit_cli/models/__init__.py +0 -0
- {testit_cli-2.9.0 → testit_cli-2.9.1}/src/testit_cli/models/config.py +0 -0
- {testit_cli-2.9.0 → testit_cli-2.9.1}/src/testit_cli/models/mode.py +0 -0
- {testit_cli-2.9.0 → testit_cli-2.9.1}/src/testit_cli/models/status_type.py +0 -0
- {testit_cli-2.9.0 → testit_cli-2.9.1}/src/testit_cli/models/testcase.py +0 -0
- {testit_cli-2.9.0 → testit_cli-2.9.1}/src/testit_cli/models/testrun.py +0 -0
- {testit_cli-2.9.0 → testit_cli-2.9.1}/src/testit_cli/parser.py +0 -0
- {testit_cli-2.9.0 → testit_cli-2.9.1}/src/testit_cli/service.py +0 -0
- {testit_cli-2.9.0 → testit_cli-2.9.1}/src/testit_cli/service_factory.py +0 -0
- {testit_cli-2.9.0 → testit_cli-2.9.1}/src/testit_cli/validation.py +0 -0
- {testit_cli-2.9.0 → testit_cli-2.9.1}/src/testit_cli.egg-info/dependency_links.txt +0 -0
- {testit_cli-2.9.0 → testit_cli-2.9.1}/src/testit_cli.egg-info/entry_points.txt +0 -0
- {testit_cli-2.9.0 → testit_cli-2.9.1}/src/testit_cli.egg-info/requires.txt +0 -0
- {testit_cli-2.9.0 → testit_cli-2.9.1}/src/testit_cli.egg-info/top_level.txt +0 -0
- {testit_cli-2.9.0 → testit_cli-2.9.1}/tests/test_click.py +0 -0
- {testit_cli-2.9.0 → testit_cli-2.9.1}/tests/test_service.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: testit-cli
|
|
3
|
-
Version: 2.9.
|
|
3
|
+
Version: 2.9.1
|
|
4
4
|
Summary: This tool is the command line wrapper of Test IT allowing you to upload the test results in real time to Test IT
|
|
5
5
|
Home-page: https://pypi.org/project/testit-cli/
|
|
6
6
|
Author: Integration team
|
|
@@ -56,6 +56,7 @@ You can see more information in [official documentation](https://docs.testit.sof
|
|
|
56
56
|
| 5.4 | 2.4.11.post540 |
|
|
57
57
|
| 5.5 | 2.7.2.post550 |
|
|
58
58
|
| 5.6 | 2.8.1.post560 |
|
|
59
|
+
| 5.7 | 2.9.0.post570 |
|
|
59
60
|
| Cloud | 2.8.0 + |
|
|
60
61
|
|
|
61
62
|
1. For current versions, see the releases tab.
|
|
@@ -23,6 +23,7 @@ You can see more information in [official documentation](https://docs.testit.sof
|
|
|
23
23
|
| 5.4 | 2.4.11.post540 |
|
|
24
24
|
| 5.5 | 2.7.2.post550 |
|
|
25
25
|
| 5.6 | 2.8.1.post560 |
|
|
26
|
+
| 5.7 | 2.9.0.post570 |
|
|
26
27
|
| Cloud | 2.8.0 + |
|
|
27
28
|
|
|
28
29
|
1. For current versions, see the releases tab.
|
|
@@ -30,6 +30,7 @@ from testit_api_client.models import (
|
|
|
30
30
|
)
|
|
31
31
|
|
|
32
32
|
from .converter import Converter
|
|
33
|
+
from .http_retry import with_http_retries
|
|
33
34
|
from .models.testrun import TestRun
|
|
34
35
|
from .html_escape_utils import HtmlEscapeUtils
|
|
35
36
|
|
|
@@ -60,7 +61,10 @@ class ApiClient:
|
|
|
60
61
|
model = HtmlEscapeUtils.escape_html_in_object(model)
|
|
61
62
|
logging.debug(f"Creating test run with model: {model}")
|
|
62
63
|
|
|
63
|
-
test_run: TestRunV2ApiResult =
|
|
64
|
+
test_run: TestRunV2ApiResult = with_http_retries(
|
|
65
|
+
lambda: self.__test_run_api.create_empty(create_empty_request=model),
|
|
66
|
+
label="Create test run",
|
|
67
|
+
)
|
|
64
68
|
|
|
65
69
|
logging.info(f'Created new testrun (ID: {test_run.id})')
|
|
66
70
|
logging.debug(f"Test run created: {test_run}")
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"""Retry transient HTTP/connection failures (extend RETRYABLE for other calls)."""
|
|
2
|
+
import logging
|
|
3
|
+
import ssl
|
|
4
|
+
from typing import Callable, Tuple, Type, TypeVar
|
|
5
|
+
|
|
6
|
+
import urllib3.exceptions
|
|
7
|
+
|
|
8
|
+
T = TypeVar("T")
|
|
9
|
+
|
|
10
|
+
# Add exception types here when wrapping more API calls.
|
|
11
|
+
RETRYABLE: Tuple[Type[BaseException], ...] = (
|
|
12
|
+
urllib3.exceptions.ProtocolError,
|
|
13
|
+
urllib3.exceptions.MaxRetryError,
|
|
14
|
+
ConnectionError,
|
|
15
|
+
TimeoutError,
|
|
16
|
+
ssl.SSLError,
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def with_http_retries(
|
|
21
|
+
fn: Callable[[], T],
|
|
22
|
+
max_attempts: int = 3,
|
|
23
|
+
label: str = "Request",
|
|
24
|
+
) -> T:
|
|
25
|
+
"""Run fn up to max_attempts times; log each failure; re-raise the last error."""
|
|
26
|
+
for attempt in range(1, max_attempts + 1):
|
|
27
|
+
try:
|
|
28
|
+
return fn()
|
|
29
|
+
except RETRYABLE as exc:
|
|
30
|
+
logging.error("%s failed (attempt %s/%s): %s", label, attempt, max_attempts, exc)
|
|
31
|
+
if attempt == max_attempts:
|
|
32
|
+
raise
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: testit-cli
|
|
3
|
-
Version: 2.9.
|
|
3
|
+
Version: 2.9.1
|
|
4
4
|
Summary: This tool is the command line wrapper of Test IT allowing you to upload the test results in real time to Test IT
|
|
5
5
|
Home-page: https://pypi.org/project/testit-cli/
|
|
6
6
|
Author: Integration team
|
|
@@ -56,6 +56,7 @@ You can see more information in [official documentation](https://docs.testit.sof
|
|
|
56
56
|
| 5.4 | 2.4.11.post540 |
|
|
57
57
|
| 5.5 | 2.7.2.post550 |
|
|
58
58
|
| 5.6 | 2.8.1.post560 |
|
|
59
|
+
| 5.7 | 2.9.0.post570 |
|
|
59
60
|
| Cloud | 2.8.0 + |
|
|
60
61
|
|
|
61
62
|
1. For current versions, see the releases tab.
|
|
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
|
|
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
|
|
File without changes
|