monasca-agent/tests
Joseph Davis 8d4bd979d5 Add remove configuration for matching arguments
The remove_config() function only removes an exact match for
the configured instance.
This will allow removing plugin configuration when all config is
not known.

Use case: A compute node has been removed, so any host_alive
ping checks that are configured for it should be removed.  But at
the time of removal the list of target_hostnames to match are
not known.

Change-Id: I8050e1eed68d7b64f7a968b061afa69fe2e86d72
Story: 2004539
Task: 28287
2020-04-23 15:56:21 -07:00
..
checks_d Use unittest.mock instead of third party mock 2020-04-18 11:54:36 -05:00
detection Use unittest.mock instead of third party mock 2020-04-18 11:54:36 -05:00
README.md Converted the agent config file to yaml to match the plugin config files 2015-03-02 18:36:15 -07:00
__init__.py Add Apache License 2018-04-14 11:50:07 +00:00
common.py Add Apache License 2018-04-14 11:50:07 +00:00
test-agent.yaml Fixed default process metrics. 2015-08-24 13:06:35 -06:00
test_agent_check.py Add Apache License 2018-04-14 11:50:07 +00:00
test_aggregator.py Enable unit tests for py36 2019-07-18 16:08:09 +02:00
test_checks_utils.py Enable unit tests for py36 2019-07-18 16:08:09 +02:00
test_config.py Use unittest.mock instead of third party mock 2020-04-18 11:54:36 -05:00
test_keystone.py Use unittest.mock instead of third party mock 2020-04-18 11:54:36 -05:00
test_metrics.py Enable unit tests for py36 2019-07-18 16:08:09 +02:00
test_modify_config.py Use unittest.mock instead of third party mock 2020-04-18 11:54:36 -05:00
test_process.py Use unittest.mock instead of third party mock 2020-04-18 11:54:36 -05:00
test_remove_config.py Add remove configuration for matching arguments 2020-04-23 15:56:21 -07:00
test_service_plugin.py Add Apache License 2018-04-14 11:50:07 +00:00
test_services_check.py Add Apache License 2018-04-14 11:50:07 +00:00

README.md

Tests for the mon agent.

Run with nosestests -w tests

For many tests to work an agent.yaml must be in either /etc/monasca/agent/agent.yaml or in the working directory.

Many tests require specific applications enabled in order for the test to run, these are skipped by default. See https://nose.readthedocs.org/en/latest/plugins/skip.html for details.