Skip to content

Commit

Permalink
tests: update test_shadow_indexing_mode_persistence
Browse files Browse the repository at this point in the history
...for sticky tiered storage configuration: the defaults
at cluster level now only apply at topic creation time,
and remain set on that topic thereafter.

Related: #6917
  • Loading branch information
jcsp committed Oct 27, 2022
1 parent 81a596d commit 94647fc
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions tests/rptest/tests/topic_creation_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,8 @@ def test_shadow_indexing_mode_persistence(self):
replicas=1,
config={"redpanda.remote.write": "false"})

# Changing the defaults after creating a topic should not change
# the configuration of the already-created topic
self.redpanda.set_cluster_config(
{
"cloud_storage_enable_remote_read": False,
Expand All @@ -309,15 +311,16 @@ def test_shadow_indexing_mode_persistence(self):
explicit_si_configs = rpk.describe_topic_configs(
topic=explicit_si_topic)

# Since this topic did not specifiy an explicit remote read/write
# policy, the values are bound to the cluster level configs.
assert default_si_configs["redpanda.remote.read"] == ("false",
"DEFAULT_CONFIG")
# This topic has topic-level properties set from the cluster defaults
# and the values should _not_ have been changed by the intervening
# change to those defaults.
assert default_si_configs["redpanda.remote.read"] == (
"true", "DYNAMIC_TOPIC_CONFIG")
assert default_si_configs["redpanda.remote.write"] == (
"true", "DEFAULT_CONFIG")
"true", "DYNAMIC_TOPIC_CONFIG")

# Since this topic specified an explicit remote read/write policy,
# the values are not overriden by the cluster config change.
# This topic was created with explicit properties that differed
# from the defaults
assert explicit_si_configs["redpanda.remote.read"] == (
"true", "DYNAMIC_TOPIC_CONFIG")
assert explicit_si_configs["redpanda.remote.write"] == (
Expand Down

0 comments on commit 94647fc

Please sign in to comment.