pytestomatio 2.8.2.dev8__tar.gz → 2.8.2.dev9__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.
- {pytestomatio-2.8.2.dev8/pytestomatio.egg-info → pytestomatio-2.8.2.dev9}/PKG-INFO +3 -1
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/README.md +2 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/pyproject.toml +1 -1
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/pytestomatio/connect/s3_connector.py +15 -8
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/pytestomatio/utils/helper.py +5 -4
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9/pytestomatio.egg-info}/PKG-INFO +3 -1
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/LICENSE +0 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/pytestomatio/__init__.py +0 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/pytestomatio/connect/__init__.py +0 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/pytestomatio/connect/connector.py +0 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/pytestomatio/decor/__init__.py +0 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/pytestomatio/decor/decorator_updater.py +0 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/pytestomatio/decor/default.py +0 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/pytestomatio/decor/pep8.py +0 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/pytestomatio/main.py +0 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/pytestomatio/testing/__init__.py +0 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/pytestomatio/testing/code_collector.py +0 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/pytestomatio/testing/testItem.py +0 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/pytestomatio/testomatio/__init__.py +0 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/pytestomatio/testomatio/testRunConfig.py +0 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/pytestomatio/testomatio/testomat_item.py +0 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/pytestomatio/testomatio/testomatio.py +0 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/pytestomatio/utils/__init__.py +0 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/pytestomatio/utils/parser_setup.py +0 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/pytestomatio/utils/validations.py +0 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/pytestomatio.egg-info/SOURCES.txt +0 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/pytestomatio.egg-info/dependency_links.txt +0 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/pytestomatio.egg-info/entry_points.txt +0 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/pytestomatio.egg-info/requires.txt +0 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/pytestomatio.egg-info/top_level.txt +0 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/setup.cfg +0 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/tests/sub/__init__.py +0 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/tests/sub/sub_mob/__init__.py +0 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/tests/sub/sub_mob/sub_sub_class_test.py +0 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/tests/sub/sub_mob/sub_sub_test.py +0 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/tests/sub/test_class_sub.py +0 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/tests/sub/test_sub.py +0 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/tests/test_class_root.py +0 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/tests/test_decorators.py +0 -0
- {pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/tests/test_root.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pytestomatio
|
|
3
|
-
Version: 2.8.2.
|
|
3
|
+
Version: 2.8.2.dev9
|
|
4
4
|
Summary: Pytest plugin to sync test with testomat.io
|
|
5
5
|
Author: Oleksii Ostapov, TikoQA
|
|
6
6
|
Project-URL: Testomat.io, https://testomat.io/
|
|
@@ -219,6 +219,8 @@ def test_example():
|
|
|
219
219
|
- test run labels, tags
|
|
220
220
|
|
|
221
221
|
## TODO
|
|
222
|
+
- retry test run update with less attributes, we get 500 from api
|
|
223
|
+
- handler non configured s3 bucket error
|
|
222
224
|
- Fix test duration
|
|
223
225
|
|
|
224
226
|
## Contribution
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from typing import Optional
|
|
1
2
|
import boto3
|
|
2
3
|
import logging
|
|
3
4
|
from io import BytesIO
|
|
@@ -6,7 +7,7 @@ log = logging.getLogger(__name__)
|
|
|
6
7
|
log.setLevel('INFO')
|
|
7
8
|
|
|
8
9
|
|
|
9
|
-
def parse_endpoint(endpoint: str
|
|
10
|
+
def parse_endpoint(endpoint: str = None) -> Optional[str]:
|
|
10
11
|
if endpoint is None:
|
|
11
12
|
return
|
|
12
13
|
if endpoint.startswith('https://'):
|
|
@@ -17,11 +18,14 @@ def parse_endpoint(endpoint: str or None) -> str or None:
|
|
|
17
18
|
|
|
18
19
|
|
|
19
20
|
class S3Connector:
|
|
20
|
-
def __init__(self,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
def __init__(self,
|
|
22
|
+
aws_region_name: Optional[str],
|
|
23
|
+
aws_access_key_id: Optional[str],
|
|
24
|
+
aws_secret_access_key: Optional[str],
|
|
25
|
+
endpoint: Optional[str],
|
|
26
|
+
bucket_name: Optional[str]):
|
|
24
27
|
|
|
28
|
+
self.aws_region_name = aws_region_name
|
|
25
29
|
self.endpoint = parse_endpoint(endpoint)
|
|
26
30
|
self.bucket_name = bucket_name
|
|
27
31
|
self.client = None
|
|
@@ -35,11 +39,14 @@ class S3Connector:
|
|
|
35
39
|
's3',
|
|
36
40
|
endpoint_url=f'https://{self.endpoint}',
|
|
37
41
|
aws_access_key_id=self.aws_access_key_id,
|
|
38
|
-
aws_secret_access_key=self.aws_secret_access_key
|
|
42
|
+
aws_secret_access_key=self.aws_secret_access_key,
|
|
43
|
+
region_name=self.aws_region_name
|
|
44
|
+
),
|
|
45
|
+
|
|
39
46
|
self._is_logged_in = True
|
|
40
47
|
log.info('s3 session created')
|
|
41
48
|
|
|
42
|
-
def upload_file(self, file_path: str, key: str = None, bucket_name: str = None) -> str
|
|
49
|
+
def upload_file(self, file_path: str, key: str = None, bucket_name: str = None) -> Optional[str]:
|
|
43
50
|
if not self._is_logged_in:
|
|
44
51
|
log.warning('s3 session is not created, creating new one')
|
|
45
52
|
return
|
|
@@ -54,7 +61,7 @@ class S3Connector:
|
|
|
54
61
|
log.info(f'artifact {file_path} uploaded to s3://{bucket_name}/{key}')
|
|
55
62
|
return f'https://{bucket_name}.{self.endpoint}/{key}'
|
|
56
63
|
|
|
57
|
-
def upload_file_object(self, file_bytes: bytes, key: str, bucket_name: str = None) -> str
|
|
64
|
+
def upload_file_object(self, file_bytes: bytes, key: str, bucket_name: str = None) -> Optional[str]:
|
|
58
65
|
if not self._is_logged_in:
|
|
59
66
|
log.warning('s3 session is not created, creating new one')
|
|
60
67
|
return
|
|
@@ -86,10 +86,11 @@ def add_and_enrich_tests(meta: list[TestItem], test_files: set,
|
|
|
86
86
|
|
|
87
87
|
def read_env_s3_keys(artifact: dict) -> tuple:
|
|
88
88
|
return (
|
|
89
|
-
os.environ.get('
|
|
90
|
-
os.environ.get('
|
|
91
|
-
os.environ.get('
|
|
92
|
-
os.environ.get('
|
|
89
|
+
os.environ.get('REGION') or os.environ.get('S3_REGION') or artifact.get('REGION'),
|
|
90
|
+
os.environ.get('ACCESS_KEY_ID') or os.environ.get('S3_ACCESS_KEY_ID') or artifact.get('ACCESS_KEY_ID'),
|
|
91
|
+
os.environ.get('SECRET_ACCESS_KEY') or os.environ.get('S3_SECRET_ACCESS_KEY') or artifact.get('SECRET_ACCESS_KEY'),
|
|
92
|
+
os.environ.get('ENDPOINT') or os.environ.get('S3_ENDPOINT') or artifact.get('ENDPOINT'),
|
|
93
|
+
os.environ.get('BUCKET') or os.environ.get('S3_BUCKET') or artifact.get('BUCKET')
|
|
93
94
|
)
|
|
94
95
|
|
|
95
96
|
def safe_string_list(param: str):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pytestomatio
|
|
3
|
-
Version: 2.8.2.
|
|
3
|
+
Version: 2.8.2.dev9
|
|
4
4
|
Summary: Pytest plugin to sync test with testomat.io
|
|
5
5
|
Author: Oleksii Ostapov, TikoQA
|
|
6
6
|
Project-URL: Testomat.io, https://testomat.io/
|
|
@@ -219,6 +219,8 @@ def test_example():
|
|
|
219
219
|
- test run labels, tags
|
|
220
220
|
|
|
221
221
|
## TODO
|
|
222
|
+
- retry test run update with less attributes, we get 500 from api
|
|
223
|
+
- handler non configured s3 bucket error
|
|
222
224
|
- Fix test duration
|
|
223
225
|
|
|
224
226
|
## Contribution
|
|
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
|
{pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/pytestomatio/testomatio/testRunConfig.py
RENAMED
|
File without changes
|
{pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/pytestomatio/testomatio/testomat_item.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytestomatio-2.8.2.dev8 → pytestomatio-2.8.2.dev9}/pytestomatio.egg-info/dependency_links.txt
RENAMED
|
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
|