Ejemplo n.º 1
0
def test_check_with_config_file(mock_api, aggregator):
    check = OpenStackControllerCheck("test", {'ssl_verify': False}, {}, instances=[common.CONFIG_FILE_INSTANCE])

    check.check(common.CONFIG_FILE_INSTANCE)

    aggregator.assert_service_check('openstack.keystone.api.up', AgentCheck.OK)
    aggregator.assert_service_check('openstack.nova.api.up', AgentCheck.OK)
    aggregator.assert_service_check('openstack.neutron.api.up', AgentCheck.OK)
    mock_api.assert_called_with(ANY, ANY, common.CONFIG_FILE_INSTANCE)
Ejemplo n.º 2
0
def test_check(mock_api, aggregator):
    check = OpenStackControllerCheck("test", {'ssl_verify': False},
                                     [common.KEYSTONE_INSTANCE])

    check.check(common.KEYSTONE_INSTANCE)

    aggregator.assert_service_check('openstack.keystone.api.up', AgentCheck.OK)
    aggregator.assert_service_check('openstack.nova.api.up', AgentCheck.OK)
    aggregator.assert_service_check('openstack.neutron.api.up', AgentCheck.OK)
    mock_api.assert_called_with(ANY, common.KEYSTONE_INSTANCE, ANY)