Exemplo n.º 1
0
 def tests_collects_sockets(self, monkeypatch):
     monkeypatch.setattr(collector.remote.commands, 'ceph_socket_version', lambda conn, socket: dict())
     monkeypatch.setattr(collector.remote.commands, 'daemon_socket_config', lambda conn, socket: dict())
     metadata = {
         'paths': {
             '/var/run/ceph': {'files': ['/var/run/ceph/osd.asok']},
         },
     }
     result = collector.collect_socket_info(Mock(), metadata)
     assert '/var/run/ceph/osd.asok' in result
Exemplo n.º 2
0
 def test_ignores_unknown_files(self, monkeypatch):
     monkeypatch.setattr(collector.remote.commands, 'ceph_socket_version',
                         lambda conn, socket: dict())
     metadata = {
         'paths': {
             '/var/run/ceph': {
                 'files':
                 ['/var/run/ceph/osd.asok', '/var/run/ceph/osd.log']
             },
         },
     }
     result = collector.collect_socket_info(Mock(), metadata)
     assert '/var/run/ceph/osd.log' not in result