from datetime import datetime
+import os
+
import pytest
import requests
@pytest.mark.json
@pytest.mark.requests
+@pytest.mark.skipif(os.getenv("HAVEJSONSTATS", "unset") != "1",
+ reason="JSON not configured")
def test_zone_timers_primary_json(statsport):
generic.test_zone_timers_primary(fetch_zones_json, load_timers_json,
statsip="10.53.0.1", statsport=statsport,
@pytest.mark.json
@pytest.mark.requests
+@pytest.mark.skipif(os.getenv("HAVEJSONSTATS", "unset") != "1",
+ reason="JSON not configured")
def test_zone_timers_secondary_json(statsport):
generic.test_zone_timers_secondary(fetch_zones_json, load_timers_json,
statsip="10.53.0.3", statsport=statsport,
@pytest.mark.json
@pytest.mark.requests
+@pytest.mark.skipif(os.getenv("HAVEJSONSTATS", "unset") != "1",
+ reason="JSON not configured")
def test_zone_with_many_keys_json(statsport):
generic.test_zone_with_many_keys(fetch_zones_json, load_zone_json,
statsip="10.53.0.2", statsport=statsport)
@pytest.mark.json
@pytest.mark.requests
@pytest.mark.dnspython
+@pytest.mark.skipif(os.getenv("HAVEJSONSTATS", "unset") != "1",
+ reason="JSON not configured")
def test_traffic_json(port, statsport):
generic.test_traffic(fetch_traffic_json,
statsip="10.53.0.2", statsport=statsport,
import xml.etree.ElementTree as ET
from datetime import datetime
+import os
+
import pytest
import requests
@pytest.mark.xml
@pytest.mark.requests
+@pytest.mark.skipif(os.getenv("HAVEXMLSTATS", "unset") != "1",
+ reason="XML not configured")
def test_zone_timers_primary_xml(statsport):
generic.test_zone_timers_primary(fetch_zones_xml, load_timers_xml,
statsip="10.53.0.1", statsport=statsport,
@pytest.mark.xml
@pytest.mark.requests
+@pytest.mark.skipif(os.getenv("HAVEXMLSTATS", "unset") != "1",
+ reason="XML not configured")
def test_zone_timers_secondary_xml(statsport):
generic.test_zone_timers_secondary(fetch_zones_xml, load_timers_xml,
statsip="10.53.0.3", statsport=statsport,
@pytest.mark.xml
@pytest.mark.requests
+@pytest.mark.skipif(os.getenv("HAVEXMLSTATS", "unset") != "1",
+ reason="XML not configured")
def test_zone_with_many_keys_xml(statsport):
generic.test_zone_with_many_keys(fetch_zones_xml, load_zone_xml,
statsip="10.53.0.2", statsport=statsport)
@pytest.mark.xml
@pytest.mark.requests
@pytest.mark.dnspython
+@pytest.mark.skipif(os.getenv("HAVEXMLSTATS", "unset") != "1",
+ reason="XML not configured")
def test_traffic_xml(port, statsport):
generic.test_traffic(fetch_traffic_xml,
statsip="10.53.0.2", statsport=statsport,