From 8d2797ce4d7c1005a52ddea5f19711ff4face7b9 Mon Sep 17 00:00:00 2001 From: Sean Marlow Date: Wed, 13 Mar 2019 14:44:18 -0500 Subject: [PATCH] Use format string for motd check. The pretty name in os-release is not always consistent. --- usr/share/lib/ipa/tests/SLES/test_sles_motd.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/usr/share/lib/ipa/tests/SLES/test_sles_motd.py b/usr/share/lib/ipa/tests/SLES/test_sles_motd.py index 198bc358..fc8b2845 100644 --- a/usr/share/lib/ipa/tests/SLES/test_sles_motd.py +++ b/usr/share/lib/ipa/tests/SLES/test_sles_motd.py @@ -1,5 +1,9 @@ def test_sles_motd(host, get_release_value): motd = host.file('/etc/motd') - pretty_name = get_release_value('PRETTY_NAME') - assert pretty_name - assert motd.contains(pretty_name) + version = get_release_value('VERSION') + assert version + assert motd.contains( + 'SUSE Linux Enterprise Server {0}'.format( + version.replace('-', ' ') + ) + )