summaryrefslogtreecommitdiffstats
path: root/ansible/roles/package-repository/molecule/default/tests/test_infrastructure-server.py
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles/package-repository/molecule/default/tests/test_infrastructure-server.py')
-rw-r--r--ansible/roles/package-repository/molecule/default/tests/test_infrastructure-server.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/ansible/roles/package-repository/molecule/default/tests/test_infrastructure-server.py b/ansible/roles/package-repository/molecule/default/tests/test_infrastructure-server.py
index 5b3fce4d..02639b6a 100644
--- a/ansible/roles/package-repository/molecule/default/tests/test_infrastructure-server.py
+++ b/ansible/roles/package-repository/molecule/default/tests/test_infrastructure-server.py
@@ -9,7 +9,8 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
def test_onap_repo(host):
os = host.system_info.distribution
if os == "centos":
- fc = host.file('/etc/yum.repos.d/moleculetestapp.repo').content_string
+ fc = host.file('/etc/yum.repos.d/moleculetestapp.repo'
+ ).content_string.strip()
expected_content = """[moleculetestapp]
baseurl = file:///opt/moleculetestapp/pkg/rpm
enabled = 1
@@ -18,6 +19,6 @@ name = MOLECULETESTAPP offline repository"""
assert fc == expected_content
elif os == "ubuntu":
fc = host.file('/etc/apt/sources.list.d/moleculetestapp.list')
- fc = fc.content_string
+ fc = fc.content_string.strip()
ec = "deb [trusted=yes] file:///opt/moleculetestapp/pkg/deb ./"
assert fc == ec