-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1.6
- Loading branch information
Showing
5 changed files
with
61 additions
and
27 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
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 @@ | ||
from _pytest.python import Function | ||
from .s3_connector import S3Connector | ||
|
||
class Testomatio: | ||
def __init__(self) -> None: | ||
self.s3_connector = None | ||
pass | ||
|
||
def set_s3_connector(self, s3_connector: S3Connector) -> None: | ||
self.s3_connector = s3_connector | ||
|
||
def upload_file(self, file_path: str, key: str = None, bucket_name: str = None) -> str: | ||
return self.s3_connector.upload_file(file_path, key, bucket_name) | ||
|
||
def upload_file_object(self, file_bytes: bytes, key: str, bucket_name: str = None) -> str: | ||
return self.s3_connector.upload_file_object(file_bytes, key, bucket_name) | ||
|
||
def add_artifacts(self, node: Function, urls: list[str]) -> None: | ||
artifact_urls = node.stash.get("artifact_urls", []) | ||
artifact_urls.extend(urls) | ||
node.stash["artifact_urls"] = artifact_urls |
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