Skip to content

Commit

Permalink
Merge pull request redpanda-data#18721 from graphcareful/backport-pr-…
Browse files Browse the repository at this point in the history
…18695-2

[v23.2.x] Fix for failing tests in `control_character_flag_test.py`
  • Loading branch information
Rob Blafford authored Jun 4, 2024
2 parents 43f2899 + e56acf9 commit 8be1a72
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions tests/rptest/tests/control_character_flag_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,11 @@ def _validate_pre_upgrade(self, version):
assert config.keys().isdisjoint(
{self.feature_legacy_permit_control_char})

def _perform_update(self, initial_version, version):
self._installer.install(self.redpanda.nodes, version)
self.redpanda.restart_nodes(self.redpanda.nodes)

unique_versions = wait_for_num_versions(self.redpanda, 1)
assert ver_string(initial_version) not in unique_versions
def _perform_update(self, initial_version):
versions = self.load_version_range(initial_version)[1:]
for version in self.upgrade_through_versions(versions,
already_running=True):
self.logger.info(f"Updated to {version}")

config = self._admin.get_cluster_config()
assert config.keys() > {self.feature_legacy_permit_control_char}
Expand Down Expand Up @@ -84,7 +83,7 @@ def test_upgrade_from_pre_v23_2(self, initial_version):
# Creates a user with invalid control characters

self._admin.create_user("my\nuser", "password", "SCRAM-SHA-256")
self._perform_update(initial_version, RedpandaInstaller.HEAD)
self._perform_update(initial_version)
# Should still be able to create a user
self._admin.create_user("my\notheruser", "password", "SCRAM-SHA-256")
self._admin.patch_cluster_config(
Expand Down Expand Up @@ -147,7 +146,7 @@ def test_validate_nag_message(self, initial_version):
# Nag shouldn't be in logs
assert not self._has_flag_nag()

self._perform_update(initial_version, RedpandaInstaller.HEAD)
self._perform_update(initial_version)

assert self._has_flag_nag()

Expand Down

0 comments on commit 8be1a72

Please sign in to comment.