]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
tests: datamodel: removed unnecessary tests
authorAleš <ales.mrazek@nic.cz>
Wed, 22 Sep 2021 15:01:02 +0000 (17:01 +0200)
committerAleš Mrázek <ales.mrazek@nic.cz>
Fri, 8 Apr 2022 14:17:53 +0000 (16:17 +0200)
manager/tests/datamodel/test_dnssec_config.py [deleted file]
manager/tests/datamodel/test_options_config.py

diff --git a/manager/tests/datamodel/test_dnssec_config.py b/manager/tests/datamodel/test_dnssec_config.py
deleted file mode 100644 (file)
index f4904b6..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-from knot_resolver_manager.datamodel.dnssec_schema import DnssecSchema
-from knot_resolver_manager.datamodel.types import TimeUnit
-
-tree = {
-    "trust-anchor-sentinel": False,
-    "trust-anchor-signal-query": False,
-    "time-skew-detection": False,
-    "keep-removed": 3,
-    "refresh-time": "10s",
-    "hold-down-time": "45d",
-    "trust-anchors": [". 3600 IN DS 19036 8 2 49AAC11D7B6F6446702E54A1607371607A1A41855200FD2CE1CDDE32F24E8FB5"],
-    "negative-trust-anchors": ["bad.boy", "example.com"],
-    "trust-anchors-files": [{"file": "root.key", "read-only": True}],
-}
-
-strict = DnssecSchema(tree)
-
-
-def test_validating():
-    assert strict.trust_anchor_sentinel == False
-    assert strict.trust_anchor_signal_query == False
-    assert strict.time_skew_detection == False
-    assert strict.keep_removed == 3
-    assert strict.refresh_time == TimeUnit("10s")
-    assert strict.hold_down_time == TimeUnit("45d")
-
-    assert strict.trust_anchors == [
-        ". 3600 IN DS 19036 8 2 49AAC11D7B6F6446702E54A1607371607A1A41855200FD2CE1CDDE32F24E8FB5"
-    ]
-    assert strict.negative_trust_anchors == ["bad.boy", "example.com"]
-    assert strict.trust_anchors_files[0].file == "root.key"
-    assert strict.trust_anchors_files[0].read_only == True
index 74aa0e421934f2c1446b3c3ce453bcde15b08275..eeb193454dc0e6901634d61c35e59db1898c3e00 100644 (file)
@@ -1,42 +1,8 @@
 from knot_resolver_manager.datamodel.options_schema import OptionsSchema
 from knot_resolver_manager.datamodel.types import TimeUnit
 
-tree = {
-    "glue-checking": "strict",
-    "qname-minimisation": False,
-    "query-loopback": True,
-    "reorder-rrset": False,
-    "query-case-randomization": False,
-    "query-priming": True,
-    "rebinding-protection": False,
-    "refuse-no-rd": False,
-    "time-jump-detection": False,
-    "violators-workarounds": True,
-    "serve-stale": True,
-    "prediction": {"window": "10m", "period": 20},
-}
 
-strict = OptionsSchema(tree)
-
-
-def test_validating():
-    assert strict.glue_checking == "strict"
-    assert strict.qname_minimisation == False
-    assert strict.query_loopback == True
-    assert strict.reorder_rrset == False
-    assert strict.query_case_randomization == False
-    assert strict.query_priming == True
-    assert strict.rebinding_protection == False
-    assert strict.refuse_no_rd == False
-    assert strict.time_jump_detection == False
-    assert strict.violators_workarounds == True
-    assert strict.serve_stale == True
-
-    assert strict.prediction.window == TimeUnit("10m")
-    assert strict.prediction.period == 20
-
-
-def test_prediction_true_defaults():
+def test_prediction_true():
     y = OptionsSchema({"prediction": True})
 
     assert y.prediction.window == TimeUnit("15m")