-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8330be4
commit a40e3d1
Showing
3 changed files
with
51 additions
and
17 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,33 @@ | ||
from typing import List, Optional, Type | ||
import uuid | ||
from snakemake_interface_storage_plugins.tests import TestStorageBase | ||
from snakemake_interface_storage_plugins.storage_provider import StorageProviderBase | ||
from snakemake_interface_storage_plugins.settings import StorageProviderSettingsBase | ||
|
||
from snakemake_storage_plugin_s3 import StorageProvider, StorageProviderSettings | ||
|
||
|
||
class TestStorageNoSettings(TestStorageBase): | ||
__test__ = True | ||
retrieve_only = False | ||
|
||
def get_query(self, tmp_path) -> str: | ||
return "gcs://snakemake-test-bucket/test-file.txt" | ||
|
||
def get_query_not_existing(self, tmp_path) -> str: | ||
bucket = uuid.uuid4().hex | ||
key = uuid.uuid4().hex | ||
return f"gcs://{bucket}/{key}" | ||
|
||
def get_storage_provider_cls(self) -> Type[StorageProviderBase]: | ||
# Return the StorageProvider class of this plugin | ||
return StorageProvider | ||
|
||
def get_storage_provider_settings(self) -> Optional[StorageProviderSettingsBase]: | ||
# instantiate StorageProviderSettings of this plugin as appropriate | ||
return StorageProviderSettings( | ||
api_endpoint="http://localhost:5050", | ||
) | ||
|
||
def get_example_args(self) -> List[str]: | ||
return [] |