Skip to content

Commit d46b766

Browse files
committed
[Test] In test_raid_correctly_configured, remove a not impactful
warning messages from the mdadm scan output. Signed-off-by: Giacomo Marciani <mgiacomo@amazon.com>
1 parent 3d68ea0 commit d46b766

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/integration-tests/tests/storage/storage_common.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,13 @@ def test_raid_correctly_configured(remote_command_executor, raid_type, volume_si
196196
mdadm_conf = remote_command_executor.run_remote_command(
197197
"sudo cat /etc/mdadm.conf || sudo cat /etc/mdadm/mdadm.conf"
198198
).stdout
199-
assert_that(mdadm_conf).contains(expected_entry)
199+
# We remove from the mdadm scan output all the warning messages that are considered not problematic.
200+
sanitized_expected_entry = re.sub(
201+
r"mdadm: Value .* cannot be set as name\. Reason: Not POSIX compatible\. Value ignored\.\n?",
202+
"",
203+
expected_entry,
204+
)
205+
assert_that(mdadm_conf).contains(sanitized_expected_entry)
200206

201207

202208
def test_raid_correctly_mounted(remote_command_executor, mount_dir, volume_size):

0 commit comments

Comments
 (0)