]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cephadm: add test assertions for nvmeof options, mount
authorJohn Mulligan <jmulligan@redhat.com>
Sat, 21 Oct 2023 20:27:13 +0000 (16:27 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Sun, 22 Oct 2023 12:29:20 +0000 (08:29 -0400)
Part of a series of commits to increase coverage of deployment
path features with regards to container engine options, env vars
and mounts. This will serve future refactoring efforts.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/cephadm/tests/test_deploy.py

index 872b2bfc7531b10c1bc8b8886f25ec215c645013..ced9a0bb7f5d7d4bd2cb4c2e5669f8df1fd9f724 100644 (file)
@@ -271,6 +271,11 @@ def test_deploy_nvmeof_container(cephadm_fs, monkeypatch):
     assert runfile_lines[-1].endswith('quay.io/ownf/nmve:latest')
     assert '-e TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES' not in runfile_lines[-1]
     assert '--pids-limit' in runfile_lines[-1]
+    assert '--ulimit memlock=-1:-1' in runfile_lines[-1]
+    assert '--cap-add=SYS_ADMIN' in runfile_lines[-1]
+    assert '--cap-add=CAP_SYS_NICE' in runfile_lines[-1]
+    assert f'-v {basedir}/ceph-nvmeof.conf:/src/ceph-nvmeof.conf:z' in runfile_lines[-1]
+    assert '--mount type=bind,source=/lib/modules,destination=/lib/modules' in runfile_lines[-1]
     _firewalld().open_ports.assert_not_called()
     with open(basedir / 'config') as f:
         assert f.read() == 'XXXXXXX'