-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chg: test: Rewrite database system test to pytest
Merge branch 'mnowak/pytest_rewrite_database' into 'main' See merge request isc-projects/bind9!9156
- Loading branch information
Showing
6 changed files
with
42 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Copyright (C) Internet Systems Consortium, Inc. ("ISC") | ||
# | ||
# SPDX-License-Identifier: MPL-2.0 | ||
# | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, you can obtain one at https://mozilla.org/MPL/2.0/. | ||
# | ||
# See the COPYRIGHT file distributed with this work for additional | ||
# information regarding copyright ownership. | ||
|
||
import isctest | ||
|
||
import dns.message | ||
|
||
|
||
def test_database(servers, templates): | ||
msg = dns.message.make_query("database.", "SOA") | ||
|
||
# checking pre reload zone | ||
res = isctest.query.tcp(msg, "10.53.0.1") | ||
assert res.answer[0] == dns.rrset.from_text( | ||
"database.", | ||
86400, | ||
"IN", | ||
"SOA", | ||
"localhost. hostmaster.isc.org. 0 28800 7200 604800 86400", | ||
) | ||
|
||
templates.render("ns1/named.conf", {"rname": "marka.isc.org."}) | ||
servers["ns1"].rndc("reload") | ||
|
||
# checking post reload zone | ||
res = isctest.query.tcp(msg, "10.53.0.1") | ||
assert res.answer[0] == dns.rrset.from_text( | ||
"database.", | ||
86400, | ||
"IN", | ||
"SOA", | ||
"localhost. marka.isc.org. 0 28800 7200 604800 86400", | ||
) |
This file was deleted.
Oops, something went wrong.