Пример #1
0
def test_is_all_special_agents_host(monkeypatch, hostname, tags, result):
    config_cache = Scenario().add_host(hostname, tags).apply(monkeypatch)
    assert config_cache.get_host_config(hostname).is_all_special_agents_host == result
Пример #2
0
def test_is_piggyback_host_auto(monkeypatch, hostname, tags, with_data, result):
    monkeypatch.setattr(piggyback, "has_piggyback_raw_data", lambda cache_age, hostname: with_data)
    config_cache = Scenario().add_host(hostname, tags).apply(monkeypatch)
    assert config_cache.get_host_config(hostname).is_piggyback_host == result
Пример #3
0
def test_is_not_usewalk_host(monkeypatch):
    config_cache = Scenario().add_host("xyz").apply(monkeypatch)
    assert config_cache.get_host_config("xyz").is_usewalk_host is False
Пример #4
0
def test_is_piggyback_host(monkeypatch, hostname, tags, result):
    config_cache = Scenario().add_host(hostname, tags).apply(monkeypatch)
    assert config_cache.get_host_config(hostname).is_piggyback_host == result