Skip to content

Commit

Permalink
Regression test for Uninett#2989
Browse files Browse the repository at this point in the history
NAV test data does not include a prefix 192.168.42.0/24.  This should
ensure the IPAM main API endpoint does not crash when asked to build
a tree for a prefix not known to NAV.
  • Loading branch information
lunkwill42 committed Sep 19, 2024
1 parent 807deb4 commit 1f4e4ee
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/integration/web/ipam/api_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
class TestPrefixViewSet:
def test_when_prefix_address_is_unknown_it_should_not_crash(self, client):
response = client.get(
"/ipam/api/",
follow=True,
data={
"net_type": "all",
"within": "192.168.42.0/24",
"show_all": "True",
},
)
assert response.status_code == 200

0 comments on commit 1f4e4ee

Please sign in to comment.