summaryrefslogtreecommitdiffstats
path: root/ansible/roles/package-repository/molecule/default/tests/test_infrastructure-server.py
diff options
context:
space:
mode:
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>2021-04-20 11:53:59 +0200
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>2021-04-20 16:04:04 +0200
commit83dd5ae87cd770ef72079db519781be6a01e7e85 (patch)
tree362ac07956bf55bdf20f81ee184836ce60b1158e /ansible/roles/package-repository/molecule/default/tests/test_infrastructure-server.py
parent91cb0cb6886ff6773e6ab2359aa3abd10406f7f2 (diff)
[MOLECULE 3.3.0] Fix verifier tests for several roles
Change-Id: I54f618fbb3d1bfefca329e647f78ba9b93f8a283 Issue-ID: OOM-2722 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
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