]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cephadm: add test assertion for snmp env file option
authorJohn Mulligan <jmulligan@redhat.com>
Sat, 21 Oct 2023 20:35:32 +0000 (16:35 -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 d7712beb85f763b21fca0162b5c8edde6f5bee6b..098bdfc3f1daa19e8e48b82f39bbf38ab7d94137 100644 (file)
@@ -97,6 +97,7 @@ def test_deploy_snmp_container(cephadm_fs, monkeypatch):
         'quay.io/aaabbb/snmp:latest --web.listen-address=:9464 --snmp.destination=192.168.100.10:8899 --snmp.version=V2c --log.level=info --snmp.trap-description-template=/etc/snmp_notifier/description-template.tpl'
     )
     assert '--pids-limit' not in runfile_lines[-1]
+    assert f'--env-file=/var/lib/ceph/{fsid}/snmp-gateway.sunmop/snmp-gateway.conf' in runfile_lines[-1]
     _firewalld().open_ports.assert_not_called()
     basedir = pathlib.Path(f'/var/lib/ceph/{fsid}/snmp-gateway.sunmop')
     assert basedir.is_dir()