Archived
Publish placeholder DNS on registration
This commit is contained in:
1 parent
99c55405bc
commit
c0d82eaf26
4 files changed
+28
-16
No files matched your search
+9
-4
@@ -273,7 +273,9 @@ def test_registration_publishes_initial_dns_when_provider_is_configured(tmp_path
|
||||
assert published[0].ipv4 == "203.0.113.77"
|
||||
|
||||
|
||||
def test_registration_without_public_source_ip_waits_for_first_router_update(tmp_path: Path, monkeypatch) -> None:
|
||||
def test_registration_without_public_source_ip_publishes_placeholder_until_first_router_update(
|
||||
tmp_path: Path, monkeypatch
|
||||
) -> None:
|
||||
published = []
|
||||
monkeypatch.setattr(ddns_module, "publish_dns", lambda result, settings: published.append(result))
|
||||
app = make_app(
|
||||
@@ -298,11 +300,14 @@ def test_registration_without_public_source_ip_waits_for_first_router_update(tmp
|
||||
assert registered.status_code == 200
|
||||
assert registered.text == "good registered"
|
||||
assert status.json()["status"] == "active"
|
||||
assert status.json()["ipv4"] is None
|
||||
assert status.json()["ipv4"] == "192.0.2.1"
|
||||
assert update.status_code == 200
|
||||
assert update.text == "good 203.0.113.80"
|
||||
assert len(published) == 1
|
||||
assert published[0].ipv4 == "203.0.113.80"
|
||||
assert len(published) == 2
|
||||
assert published[0].ipv4 == "192.0.2.1"
|
||||
assert published[0].update_ipv4 is True
|
||||
assert published[0].update_ipv6 is False
|
||||
assert published[1].ipv4 == "203.0.113.80"
|
||||
|
||||
|
||||
def test_api_update_publishes_before_recording_ip(tmp_path: Path, monkeypatch) -> None:
|
||||
|
||||
Reference in new issue
Block a user