Skip to content

Commit

Permalink
rptest: remove ducktape parameterization for remote perms
Browse files Browse the repository at this point in the history
These tests no longer need to be parameterized based on the values of
`remote.read` and `remote.write`. Remove the parameterizations.

Also fix `cluster_config_test`, which is failing to self-configure
in the case that `cloud_storage_url_style` is left unspecified.
  • Loading branch information
WillemKauf committed Aug 17, 2024
1 parent 4a8a7ae commit 011e56b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 38 deletions.
15 changes: 10 additions & 5 deletions tests/rptest/tests/cluster_config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1455,27 +1455,31 @@ def test_cloud_validation(self):
'cloud_storage_enabled': True,
'cloud_storage_credentials_source': 'aws_instance_metadata',
'cloud_storage_region': 'us-east-1',
'cloud_storage_bucket': 'dearliza'
'cloud_storage_bucket': 'dearliza',
'cloud_storage_url_style': 'virtual_host'
},
{
'cloud_storage_enabled': True,
'cloud_storage_credentials_source': 'gcp_instance_metadata',
'cloud_storage_region': 'us-east-1',
'cloud_storage_bucket': 'dearliza'
'cloud_storage_bucket': 'dearliza',
'cloud_storage_url_style': 'virtual_host'
},
{
'cloud_storage_enabled': True,
'cloud_storage_credentials_source': 'sts',
'cloud_storage_region': 'us-east-1',
'cloud_storage_bucket': 'dearliza'
'cloud_storage_bucket': 'dearliza',
'cloud_storage_url_style': 'virtual_host'
},
{
'cloud_storage_enabled': True,
'cloud_storage_secret_key': 'open',
'cloud_storage_access_key': 'sesame',
'cloud_storage_credentials_source': 'config_file',
'cloud_storage_region': 'us-east-1',
'cloud_storage_bucket': 'dearliza'
'cloud_storage_bucket': 'dearliza',
'cloud_storage_url_style': 'virtual_host'
},
]
for payload in valid_updates:
Expand Down Expand Up @@ -1504,7 +1508,8 @@ def test_cloud_validation(self):
'cloud_storage_secret_key': 'open',
'cloud_storage_access_key': 'sesame',
'cloud_storage_region': 'us-east-1',
'cloud_storage_bucket': 'dearliza'
'cloud_storage_bucket': 'dearliza',
'cloud_storage_url_style': 'virtual_host'
}
patch_result = self.admin.patch_cluster_config(upsert=static_config,
remove=[])
Expand Down
27 changes: 5 additions & 22 deletions tests/rptest/tests/cluster_self_config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,8 @@ def self_config_result_from_logs(self, node):

@cluster(num_nodes=1)
@matrix(cloud_storage_type=get_cloud_storage_type(
applies_only_on=[CloudStorageType.S3]),
cloud_storage_enable_remote_read=[True, False],
cloud_storage_enable_remote_write=[True, False])
def test_s3_self_config(self, cloud_storage_type,
cloud_storage_enable_remote_read,
cloud_storage_enable_remote_write):
applies_only_on=[CloudStorageType.S3]))
def test_s3_self_config(self, cloud_storage_type):
"""
Verify that cloud_storage_url_style self configuration occurs for the s3_client
when it is not specified. There aren't any endpoints for testing this, so
Expand All @@ -61,10 +57,7 @@ def test_s3_self_config(self, cloud_storage_type,
si_settings = SISettings(
self.ctx,
# Force self configuration through setting cloud_storage_url_style to None.
cloud_storage_url_style=None,
cloud_storage_enable_remote_read=cloud_storage_enable_remote_read,
cloud_storage_enable_remote_write=cloud_storage_enable_remote_write
)
cloud_storage_url_style=None)

self.start_redpanda(si_settings=si_settings)
admin = Admin(self.redpanda)
Expand All @@ -81,10 +74,6 @@ def test_s3_self_config(self, cloud_storage_type,
# Assert that self configuration started.
assert self.self_config_start_in_logs(node)

# If neither remote_read or remote_write are enabled, check for the "defaulting" output
if not cloud_storage_enable_remote_read and not cloud_storage_enable_remote_write:
assert self.self_config_default_in_logs(node)

# Assert that self configuration returned a result.
self_config_result = self.self_config_result_from_logs(node)

Expand All @@ -98,12 +87,8 @@ def test_s3_self_config(self, cloud_storage_type,

@cluster(num_nodes=1)
@matrix(cloud_storage_type=get_cloud_storage_type(
applies_only_on=[CloudStorageType.S3]),
cloud_storage_enable_remote_read=[True, False],
cloud_storage_enable_remote_write=[True, False])
def test_s3_oracle_self_config(self, cloud_storage_type,
cloud_storage_enable_remote_read,
cloud_storage_enable_remote_write):
applies_only_on=[CloudStorageType.S3]))
def test_s3_oracle_self_config(self, cloud_storage_type):
"""
Verify that the cloud_storage_url_style self-configuration for OCI
backend always results in path-style.
Expand All @@ -116,8 +101,6 @@ def test_s3_oracle_self_config(self, cloud_storage_type,
# https://docs.oracle.com/en-us/iaas/Content/Object/Tasks/s3compatibleapi_topic-Amazon_S3_Compatibility_API_Support.htm#s3-api-support
cloud_storage_api_endpoint=
'mynamespace.compat.objectstorage.us-phoenix-1.oraclecloud.com',
cloud_storage_enable_remote_read=cloud_storage_enable_remote_read,
cloud_storage_enable_remote_write=cloud_storage_enable_remote_write,
# Bypass bucket creation, cleanup, and scrubbing, as we won't actually be able to access the endpoint (Self configuration will usi the endpoint to set path-style).
bypass_bucket_creation=True,
use_bucket_cleanup_policy=False,
Expand Down
16 changes: 5 additions & 11 deletions tests/rptest/tests/self_test_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,12 @@ def all_idle():
return wait_until_result(all_idle, timeout_sec=90, backoff_sec=1)

@cluster(num_nodes=3)
@matrix(remote_read=[True, False], remote_write=[True, False])
def test_self_test(self, remote_read, remote_write):
def test_self_test(self):
"""Assert the self test starts/completes with success."""
num_nodes = 3
self.start_redpanda(
num_nodes=num_nodes,
si_settings=SISettings(
test_context=self.test_context,
cloud_storage_enable_remote_read=remote_read,
cloud_storage_enable_remote_write=remote_write))
si_settings=SISettings(test_context=self.test_context))
self.rpk_client().self_test_start(2000, 2000, 5000, 100)

# Wait for completion
Expand Down Expand Up @@ -215,11 +211,9 @@ def test_self_test_unknown_test_type(self):
with mixed versions of Redpanda."""
num_nodes = 3

self.start_redpanda(num_nodes=num_nodes,
si_settings=SISettings(
test_context=self.test_context,
cloud_storage_enable_remote_read=True,
cloud_storage_enable_remote_write=True))
self.start_redpanda(
num_nodes=num_nodes,
si_settings=SISettings(test_context=self.test_context))

#Attempt to run with an unknown test type "pandatest"
#and possibly unknown "cloud" test.
Expand Down

0 comments on commit 011e56b

Please sign in to comment.