mirror of
https://github.com/thegeeklab/prometheus-pve-sd.git
synced 2024-06-02 07:59:40 +02:00
Add propate test
This commit is contained in:
parent
1a19aac85a
commit
ea99461214
|
@ -93,3 +93,15 @@ def test_get_ip_addresses(mocker, discovery, networks):
|
|||
networks[1]["ip-addresses"][0]["ip-address"],
|
||||
networks[1]["ip-addresses"][2]["ip-address"],
|
||||
)
|
||||
|
||||
|
||||
def test_propagate(
|
||||
mocker, discovery, nodes, qemus, instance_config, agent_info, networks, inventory
|
||||
):
|
||||
mocker.patch.object(ProxmoxClient, "get_nodes", return_value=nodes)
|
||||
mocker.patch.object(ProxmoxClient, "get_all_vms", return_value=qemus)
|
||||
mocker.patch.object(ProxmoxClient, "get_instance_config", return_value=instance_config)
|
||||
mocker.patch.object(ProxmoxClient, "get_agent_info", return_value=agent_info)
|
||||
mocker.patch.object(ProxmoxClient, "get_network_interfaces", return_value=networks)
|
||||
|
||||
assert discovery.propagate() == inventory
|
||||
|
|
Loading…
Reference in New Issue
Block a user