From 2ee7d416544338ffe49ef19c18250819dbd2fd51 Mon Sep 17 00:00:00 2001 From: James Falcon Date: Tue, 9 Feb 2021 09:34:58 -0500 Subject: [PATCH] Fix attempting to decode binary data in test_seed_random_data test `test_seed_random_data.py` was failing on openstack as openstack provides additional binary seed data to the end of the specified file. The test has been changed to only read the ascii porition of seed file. --- tests/integration_tests/modules/test_seed_random_data.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/integration_tests/modules/test_seed_random_data.py b/tests/integration_tests/modules/test_seed_random_data.py index f6a67c19e9e..94e982e0dce 100644 --- a/tests/integration_tests/modules/test_seed_random_data.py +++ b/tests/integration_tests/modules/test_seed_random_data.py @@ -24,5 +24,7 @@ class TestSeedRandomData: @pytest.mark.user_data(USER_DATA) def test_seed_random_data(self, client): - seed_output = client.read_from_file("/root/seed") - assert seed_output.startswith("MYUb34023nD:LFDK10913jk;dfnk:Df") + # Only read the first 31 characters, because the rest could be + # binary data + result = client.execute("head -c 31 < /root/seed") + assert result.startswith("MYUb34023nD:LFDK10913jk;dfnk:Df")