Skip to content

Commit e2e4377

Browse files
committed
tests: cover roles migrator task in test_task_states_change
Add the roles migrator to CONTROLLER_LOCKED_TASKS and enable role sync on the link so the existing source-outage / controller-placement assertions also exercise the controller-locked roles task.
1 parent d9c67f3 commit e2e4377

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

tests/rptest/tests/cluster_linking_e2e_test.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,20 @@ def test_create_simple_link(self):
409409
def test_task_states_change(self):
410410
topic = TopicSpec(name="test-topic", partition_count=3, replication_factor=3)
411411
self.source_default_client().create_topic(topic)
412-
self.create_link("test-link")
412+
req = self.create_default_link_request("test-link")
413+
req.shadow_link.configurations.role_sync_options.CopyFrom(
414+
shadow_link_pb2.RoleSyncOptions(
415+
interval=google.protobuf.duration_pb2.Duration(seconds=1),
416+
role_name_filters=[
417+
shadow_link_pb2.NameFilter(
418+
pattern_type=shadow_link_pb2.PATTERN_TYPE_PREFIX,
419+
filter_type=shadow_link_pb2.FILTER_TYPE_INCLUDE,
420+
name="e2e-roles-",
421+
)
422+
],
423+
)
424+
)
425+
self.create_link_with_request(req)
413426

414427
wait_until(
415428
lambda: self._topics_are_present_in_target_cluster([topic]),

tests/rptest/tests/cluster_linking_test_base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
CONTROLLER_LOCKED_TASKS = [
100100
"Source Topic Sync",
101101
"Security Migrator Task",
102+
"Roles Migrator Task",
102103
]
103104

104105
ALL_STORAGE_MODES = [

0 commit comments

Comments
 (0)