Skip to content

Commit

Permalink
si_settings: remove AUTO from cloud storage type
Browse files Browse the repository at this point in the history
  • Loading branch information
gousteris committed Mar 15, 2023
1 parent c53c678 commit c89dfb6
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions tests/rptest/services/redpanda.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,6 @@ class CloudStorageType(IntEnum):
S3 = 1
# Use Azure ABS on dedicated nodes, or azurite in docker
ABS = 2
# Auto-select the cloud's storage service on dedicated nodes, or use minio+S3 on docker
AUTO = 3


def one_or_many(value):
Expand Down Expand Up @@ -319,8 +317,6 @@ class SISettings:
GLOBAL_ABS_SHARED_KEY = "abs_shared_key"
GLOBAL_CLOUD_PROVIDER = "cloud_provider"

DEDICATED_NODE_KEY = "dedicated_nodes"

# The account and key to use with local Azurite testing.
# These are the default Azurite (Azure emulator) storage account and shared key.
# Both are readily available in the docs.
Expand Down Expand Up @@ -356,30 +352,13 @@ def __init__(self,
quickly when they wait for uploads to complete.
"""

self.cloud_storage_type = CloudStorageType.AUTO
self.cloud_storage_type = get_cloud_storage_type()[0]
if hasattr(test_context, 'injected_args') \
and test_context.injected_args is not None \
and 'cloud_storage_type' in test_context.injected_args:
self.cloud_storage_type = test_context.injected_args[
'cloud_storage_type']

if self.cloud_storage_type == CloudStorageType.AUTO:
dedicated_nodes = test_context.globals.get(self.DEDICATED_NODE_KEY,
False)
if dedicated_nodes:
abs_shared_key = test_context.globals.get(
self.GLOBAL_ABS_SHARED_KEY, None)
s3_region = test_context.globals.get(self.GLOBAL_S3_REGION_KEY,
None)
if abs_shared_key is not None:
self.cloud_storage_type = CloudStorageType.ABS
elif s3_region is not None:
self.cloud_storage_type = CloudStorageType.S3
else:
raise RuntimeError("Cannot autodetect cloud storage")
else:
self.cloud_storage_type = CloudStorageType.S3

if self.cloud_storage_type == CloudStorageType.S3:
self.cloud_storage_credentials_source = cloud_storage_credentials_source
self.cloud_storage_access_key = cloud_storage_access_key
Expand Down

0 comments on commit c89dfb6

Please sign in to comment.