diff options
author | Jan Benedikt <j.benedikt@partner.samsung.com> | 2020-02-10 16:06:37 +0100 |
---|---|---|
committer | Bartek Grzybowski <b.grzybowski@partner.samsung.com> | 2020-04-21 11:56:44 +0000 |
commit | f3155391b561bee41939bc2b72dbfa804cdcfac4 (patch) | |
tree | c5cad4d3ec92aa9c05dfdcd36a33c6a4cbc821af /ansible/roles/nfs/molecule/default/tests/test_nfs-server.py | |
parent | 12e752ba35476f48b0253b1dd2a8a1ebe020da0e (diff) |
Adding Ubuntu support in Ansible - nfs role
Extending ansible playbooks of ubuntu support.
Creating new test with Ubuntu image for Molecule in nfs role.
Issue-ID: OOM-1671
Signed-off-by: Jan Benedikt <j.benedikt@partner.samsung.com>
Change-Id: Ib1c85e4df7ec2ba547a20684ed5e23e097351df2
Diffstat (limited to 'ansible/roles/nfs/molecule/default/tests/test_nfs-server.py')
-rw-r--r-- | ansible/roles/nfs/molecule/default/tests/test_nfs-server.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ansible/roles/nfs/molecule/default/tests/test_nfs-server.py b/ansible/roles/nfs/molecule/default/tests/test_nfs-server.py index 88ba0a61..e35e21c3 100644 --- a/ansible/roles/nfs/molecule/default/tests/test_nfs-server.py +++ b/ansible/roles/nfs/molecule/default/tests/test_nfs-server.py @@ -20,9 +20,14 @@ def test_svc(host, svc): def test_exports(host): + os = host.system_info.distribution + if (os == "centos"): + host_file = "/etc/exports.d/dockerdata-nfs.exports" + elif (os == "ubuntu"): + host_file = "/etc/exports" node2_ip = testinfra.get_host("docker://kubernetes-node-2").interface( "eth0").addresses[0] - f = host.file("/etc/exports.d/dockerdata-nfs.exports") + f = host.file(host_file) assert f.exists assert f.content_string == \ """/dockerdata-nfs """ + node2_ip + """(rw,sync,no_root_squash,no_subtree_check)""" # noqa: E501 |