sv.push_back("\"asdf\"");
sv.push_back("null");
sv.push_back("[ 1, 2, 3, 4 ]");
- sv.push_back("{ \"name\": \"foo\", \"value\": 47806 }");
+ sv.push_back("{ \"name\": \"foo\", \"value\": 56176 }");
sv.push_back("[ { \"a\": 1, \"b\": \"c\" }, { \"a\": 2, \"b\": \"d\" } ]");
sv.push_back("8.23");
sv.push_back("123.456");
el->set(0, Element::fromJSON("\"foo\""));
EXPECT_EQ(el->get(0)->stringValue(), "foo");
- el->add(Element::create(47806));
- EXPECT_EQ(el->get(3)->intValue(), 47806);
+ el->add(Element::create(56176));
+ EXPECT_EQ(el->get(3)->intValue(), 56176);
el->remove(1);
el->remove(1);
- EXPECT_EQ(el->str(), "[ \"foo\", 47806 ]");
+ EXPECT_EQ(el->str(), "[ \"foo\", 56176 ]");
// hmm, it errors on EXPECT_THROW(el->get(3), std::out_of_range)
EXPECT_ANY_THROW(el->get(3));
EXPECT_TRUE(isNull(el->get("value3")));
- el->set("value3", Element::create(47806));
- EXPECT_EQ(el->get("value3")->intValue(), 47806);
+ el->set("value3", Element::create(56176));
+ EXPECT_EQ(el->get("value3")->intValue(), 56176);
el->remove("value3");
EXPECT_TRUE(isNull(el->get("value3")));
"item_name": "v92b",
"item_type": "integer",
"item_optional": false,
- "item_default": 47806
+ "item_default": 56176
}
]
}
"item_name": "v92b",
"item_type": "integer",
"item_optional": false,
- "item_default": 47806
+ "item_default": 56176
}
]
}
self.assertEqual(sess._sequence, 1)
self.assertEqual(sess._next_sequence(), 2)
self.assertEqual(sess._sequence, 2)
- sess._sequence = 47805
- self.assertEqual(sess._sequence, 47805)
- self.assertEqual(sess._next_sequence(), 47806)
- self.assertEqual(sess._sequence, 47806)
+ sess._sequence = 56175
+ self.assertEqual(sess._sequence, 56175)
+ self.assertEqual(sess._next_sequence(), 56176)
+ self.assertEqual(sess._sequence, 56176)
def test_group_subscribe(self):
sess = MySession()
'modified': False,
'name': 'Spec22/value9/v92/v92b',
'type': 'integer',
- 'value': 47806
+ 'value': 56176
}
]
maps = self.mcd.get_value_maps("/Spec22/value9")
Running the tests
-----------------
-At this moment, we have a fixed port for local tests in our setups, port 47806.
+At this moment, we have a fixed port for local tests in our setups, port 56176.
This port must be free. (TODO: can we make this run-time discovered?).
-Port 47805 is used for cmdctl, and must also be available.
+Port 56175 is used for cmdctl, and must also be available.
(note, we will need to extend this to a range, or if possible, we will need to
do some on-the-fly available port finding)
+++ /dev/null
-Note well:
-
-In some configuration we intentionally use an IPv6 address (::1) with
-port 47807. DO NOT CHANGE THAT; at least do not change it to
-127.0.0.1:47807. See git e3f4b290d17a68db728166cdffcbe93517966e8b
-for why.
},
"Auth": {
"listen_on": [{
- "port": 47806,
+ "port": 56176,
"address": "127.0.0.1"
}]
},
},
"Auth": {
"listen_on": [ {
- "port": 47806,
+ "port": 56176,
"address": "127.0.0.1"
} ]
},
"Auth": {
"database_file": "data/example.org.sqlite3",
"listen_on": [ {
- "port": 47806,
+ "port": 56176,
"address": "127.0.0.1"
} ]
},
"Auth": {
"database_file": "data/example.org.sqlite3",
"listen_on": [ {
- "port": 47806,
+ "port": 56176,
"address": "127.0.0.1"
} ]
},
"database_file": "data/ddns/example.org.sqlite3",
"listen_on": [
{
- "port": 47806,
+ "port": 56176,
"address":
"127.0.0.1"
}
"database_file": "data/ddns/example.org.sqlite3",
"listen_on": [
{
- "port": 47806,
+ "port": 56176,
"address": "127.0.0.1"
}
]
"Auth": {
"database_file": "data/example.org.sqlite3",
"listen_on": [ {
- "port": 47806,
+ "port": 56176,
"address": "127.0.0.1"
} ]
},
},
"Auth": {
"listen_on": [{
- "port": 47806,
+ "port": 56176,
"address": "127.0.0.1"
}]
},
"Auth": {
"database_file": "data/example.org.sqlite3",
"listen_on": [ {
- "port": 47807,
+ "port": 56177,
"address": "::1"
} ]
},
},
"Auth": {
"listen_on": [{
- "port": 47806,
+ "port": 56176,
"address": "127.0.0.1"
}]
},
},
"Auth": {
"listen_on": [ {
- "port": 47806,
+ "port": 56176,
"address": "127.0.0.1"
} ]
},
"database_file": "data/ixfr-out/zones.sqlite3",
"listen_on": [
{
- "port": 47806,
+ "port": 56176,
"address": "::"
},
{
- "port": 47806,
+ "port": 56176,
"address": "0.0.0.0"
}
]
"Auth": {
"database_file": "data/test_nonexistent_db.sqlite3",
"listen_on": [ {
- "port": 47806,
+ "port": 56176,
"address": "127.0.0.1"
} ]
},
"Auth": {
"database_file": "data/test_nonexistent_db.sqlite3",
"listen_on": [ {
- "port": 47806,
+ "port": 56176,
"address": "127.0.0.1"
} ]
},
"Auth": {
"datasources": [
{"zones": [{"origin": "example.", "file": "configurations/nsec3/rfc5155-example.zone.signed"}], "type": "memory"}],
- "listen_on": [{"port": 47806, "address": "0.0.0.0"}
+ "listen_on": [{"port": 56176, "address": "0.0.0.0"}
]
},
"data_sources": {
"from": "127.0.0.1"
} ],
"listen_on": [ {
- "port": 47806,
+ "port": 56176,
"address": "127.0.0.1"
} ]
},
"database_file": "data/inmem-xfrin.sqlite3",
"listen_on": [ {
"address": "::1",
- "port": 47806
+ "port": 56176
} ]
},
"data_sources": {
"database_file": "data/example.org.sqlite3",
"listen_on": [ {
"address": "::1",
- "port": 47807
+ "port": 56177
} ]
},
"data_sources": {
} ],
"also_notify": [ {
"address": "::1",
- "port": 47806
+ "port": 56176
} ]
},
"Init": {
"database_file": "data/xfrin-diffs.sqlite3",
"listen_on": [ {
"address": "::1",
- "port": 47807
+ "port": 56177
} ]
},
"data_sources": {
} ],
"also_notify": [ {
"address": "::1",
- "port": 47806
+ "port": 56176
} ]
},
"Stats": {
"database_file": "data/example.org-nons.sqlite3",
"listen_on": [ {
"address": "::1",
- "port": 47807
+ "port": 56177
} ]
},
"data_sources": {
} ],
"also_notify": [ {
"address": "::1",
- "port": 47806
+ "port": 56176
} ]
},
"Stats": {
"database_file": "data/example.org.sqlite3",
"listen_on": [ {
"address": "127.0.0.1",
- "port": 47809
+ "port": 56179
} ]
},
"data_sources": {
} ],
"also_notify": [ {
"address": "127.0.0.1",
- "port": 47806
+ "port": 56176
} ]
},
"Init": {
"Auth": {
"listen_on": [ {
"address": "::1",
- "port": 47806
+ "port": 56176
} ]
},
"data_sources": {
"Auth": {
"listen_on": [ {
"address": "::1",
- "port": 47806
+ "port": 56176
} ]
},
"Xfrin": {
"zones": [ {
"name": "example",
"master_addr": "::1",
- "master_port": 47807
+ "master_port": 56177
} ]
},
"data_sources": {
"Auth": {
"listen_on": [ {
"address": "::1",
- "port": 47806
+ "port": 56176
} ]
},
"data_sources": {
"zones": [ {
"name": "example.org",
"master_addr": "::1",
- "master_port": 47807,
+ "master_port": 56177,
"request_ixfr": "no"
} ]
},
"Auth": {
"listen_on": [ {
"address": "127.0.0.1",
- "port": 47806
+ "port": 56176
} ]
},
"data_sources": {
"zones": [ {
"name": "example.org",
"master_addr": "127.0.0.1",
- "master_port": 47809,
+ "master_port": 56179,
"request_ixfr": "no"
} ]
},
"database_file": "data/xfrout.sqlite3",
"listen_on": [ {
"address": "::1",
- "port": 47806
+ "port": 56176
} ]
},
"data_sources": {
# And wait for primary stderr message XFROUT_STARTED
# And wait for primary stderr message DDNS_STARTED
- # And I start bind10 with configuration example2.org.config with cmdctl port 47804 as secondary
+ # And I start bind10 with configuration example2.org.config with cmdctl port 56174 as secondary
# And wait for secondary stderr message AUTH_SERVER_STARTED
# And wait for secondary stderr message XFRIN_STARTED
# # Sanity check
# The SOA serial for example.org should be 1234
- # The SOA serial for example.org at 127.0.0.1:47807 should be 1234
+ # The SOA serial for example.org at 127.0.0.1:56177 should be 1234
# When I use DDNS to set the SOA serial to 1235
# The DDNS response should be SUCCESS
# The SOA serial for example.org should be 1235
- # The SOA serial for example.org at 127.0.0.1:47807 should be 1235
+ # The SOA serial for example.org at 127.0.0.1:56177 should be 1235
# where
A query for www.example.org class CH should have rcode REFUSED
A query for www.example.org to 127.0.0.1 should have rcode NOERROR
- A query for www.example.org to 127.0.0.1:47806 should have rcode NOERROR
- A query for www.example.org type A class IN to 127.0.0.1:47806 should have rcode NOERROR
+ A query for www.example.org to 127.0.0.1:56176 should have rcode NOERROR
+ A query for www.example.org type A class IN to 127.0.0.1:56176 should have rcode NOERROR
Scenario: example.org mixed-case query
# This scenario performs a mixed-case query and checks that the
And wait for bind10_one stderr message CMDCTL_STARTED
And wait for bind10_one stderr message AUTH_SERVER_STARTED
- And I start bind10 with configuration example2.org.config with cmdctl port 47804 as bind10_two
+ And I start bind10 with configuration example2.org.config with cmdctl port 56174 as bind10_two
And wait for bind10_two stderr message BIND10_STARTED_CC
And wait for bind10_two stderr message CMDCTL_STARTED
And wait for bind10_two stderr message AUTH_SERVER_STARTED
- A query for www.example.org to 127.0.0.1:47806 should have rcode NOERROR
- A query for www.example.org to [::1]:47807 should have rcode NOERROR
+ A query for www.example.org to 127.0.0.1:56176 should have rcode NOERROR
+ A query for www.example.org to [::1]:56177 should have rcode NOERROR
The SOA serial for example.org should be 1234
- The SOA serial for example.org at 127.0.0.1:47806 should be 1234
- The SOA serial for example.org at ::1:47807 should be 1234
+ The SOA serial for example.org at 127.0.0.1:56176 should be 1234
+ The SOA serial for example.org at ::1:56177 should be 1234
Then set bind10 configuration data_sources/classes/IN[0]/params to {"database_file": "data/empty_db.sqlite3"}
And wait for bind10_one stderr message DATASRC_SQLITE_CONNOPEN
- A query for www.example.org to 127.0.0.1:47806 should have rcode REFUSED
- A query for www.example.org to [::1]:47807 should have rcode NOERROR
+ A query for www.example.org to 127.0.0.1:56176 should have rcode REFUSED
+ A query for www.example.org to [::1]:56177 should have rcode NOERROR
The SOA serial for example.org should be 1234
Scenario: 2. In-memory datasource backed by sqlite3
- Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 47804 as master
+ Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 56174 as master
And wait for master stderr message BIND10_STARTED_CC
And wait for master stderr message CMDCTL_STARTED
And wait for master stderr message AUTH_SERVER_STARTED
And wait for bind10 stderr message XFRIN_STARTED
And wait for bind10 stderr message ZONEMGR_STARTED
- A query for www.example.org to [::1]:47806 should have rcode NOERROR
+ A query for www.example.org to [::1]:56176 should have rcode NOERROR
"""
www.example.org. 3600 IN A 192.0.2.63
"""
- A query for mail.example.org to [::1]:47806 should have rcode NXDOMAIN
- When I send bind10 the command Xfrin retransfer example.org IN ::1 47807
+ A query for mail.example.org to [::1]:56176 should have rcode NXDOMAIN
+ When I send bind10 the command Xfrin retransfer example.org IN ::1 56177
Then wait for new bind10 stderr message XFRIN_TRANSFER_SUCCESS not XFRIN_XFR_PROCESS_FAILURE
Then wait for new bind10 stderr message AUTH_DATASRC_CLIENTS_BUILDER_LOAD_ZONE
- A query for www.example.org to [::1]:47807 should have rcode NOERROR
+ A query for www.example.org to [::1]:56177 should have rcode NOERROR
The answer section of the last query response should be
"""
www.example.org. 3600 IN A 192.0.2.1
"""
- A query for mail.example.org to [::1]:47806 should have rcode NOERROR
+ A query for mail.example.org to [::1]:56176 should have rcode NOERROR
will be used. The path is relative to the base lettuce
directory.
cmdctl_port ('with cmdctl port <portnr>', optional): The port on which
- b10-cmdctl listens for bindctl commands. Defaults to 47805.
+ b10-cmdctl listens for bindctl commands. Defaults to 56175.
msgq_sockfile ('with msgq socket file', optional): The msgq socket file
that will be used for internal communication
process_name ('as <name>', optional). This is the name that can be used
args.append('-c')
args.append(config_file)
if cmdctl_port is None:
- args.append('--cmdctl-port=47805')
+ args.append('--cmdctl-port=56175')
else:
args.append('--cmdctl-port=' + cmdctl_port)
if process_name is None:
commands: a sequence of strings which will be sent.
cmdctl_port: a port number on which cmdctl is listening, is converted
to string if necessary. If not provided, or None, defaults
- to 47805
+ to 56175
ignore_failure(bool): if set to True, don't examin the result code
of bindctl and assert it succeeds.
Fails if the return code is not 0
"""
if cmdctl_port is None:
- cmdctl_port = 47805
+ cmdctl_port = 56175
args = ['bindctl', '-p', str(cmdctl_port)]
bindctl = subprocess.Popen(args, 1, None, subprocess.PIPE,
subprocess.PIPE, None)
name ('configuration <name>'): Identifier of the configuration to set
value ('to <value>'): value to set it to.
cmdctl_port ('with cmdctl port <portnr>', optional): cmdctl port to send
- the command to. Defaults to 47805.
+ the command to. Defaults to 56175.
Fails if cmdctl does not exit with status code 0.
"""
commands = ["config set " + name + " " + value,
Run bindctl, and send it the given multiline set of commands.
A quit command is always appended.
cmdctl_port ('with cmdctl port <portnr>', optional): cmdctl port to send
- the command to. Defaults to 47805.
+ the command to. Defaults to 56175.
Fails if cmdctl does not exit with status code 0.
"""
commands = step.multiline.split("\n")
value ('value <value>'): if name is a named set, use value to identify
item to remove
cmdctl_port ('with cmdctl port <portnr>', optional): cmdctl port to send
- the command to. Defaults to 47805.
+ the command to. Defaults to 56175.
Fails if cmdctl does not exit with status code 0.
"""
cmd = "config remove " + name
Parameters:
command ('the command <command>'): The command to send.
cmdctl_port ('with cmdctl port <portnr>', optional): cmdctl port to send
- the command to. Defaults to 47805.
+ the command to. Defaults to 56175.
ignore_failure ('ignoring failure', optional): set to None if bindctl
is expected to succeed (normal case, which is the default); if it is
not None, it means bindctl is expected to fail (and it's acceptable).
if port is not None:
commands[0] = commands[0] + " " + port
else:
- commands[0] = commands[0] + " 47806"
+ commands[0] = commands[0] + " 56176"
if zone is not None:
commands.append("zone " + zone)
world.nsupdate_commands = commands
#
# query for <name> [type X] [class X] [to <addr>[:port]] should have rcode <rc>
#
-# By default, it will send queries to 127.0.0.1:47806 unless specified
+# By default, it will send queries to 127.0.0.1:56176 unless specified
# otherwise. The rcode is always checked. If the result is not NO_ANSWER,
# the result will be stored in last_query_result, which can then be inspected
# more closely, for instance with the step
addr ('to <address>', optional): The IP address of the nameserver to query.
Defaults to 127.0.0.1.
port (':<port>', optional): The port number of the nameserver to query.
- Defaults to 47806.
+ Defaults to 56176.
rcode ('should have rcode <rcode>'): The expected rcode of the answer.
"""
if qtype is None:
addr = "127.0.0.1"
addr = re.sub(r"\[(.+)\]", r"\1", addr) # convert [IPv6_addr] to IPv6_addr
if port is None:
- port = 47806
+ port = 56176
additional_arguments = []
if dnssec is not None:
additional_arguments.append("+dnssec")
def query_soa(step, query_name, address, port, serial=None):
"""
Convenience function to check the SOA SERIAL value of the given zone at
- the nameserver at the default address (127.0.0.1:47806).
+ the nameserver at the default address (127.0.0.1:56176).
Parameters:
query_name ('for <name>'): The zone to find the SOA record for.
serial ('should be <number>'): The expected value of the SOA SERIAL.
if address is None:
address = "127.0.0.1"
if port is None:
- port = "47806"
+ port = "56176"
query_result = QueryResult(query_name, "SOA", "IN", address, port)
assert "NOERROR" == query_result.rcode,\
"Got " + query_result.rcode + ", expected NOERROR"
def parse_addr_port(address, port):
if address is None:
- address = "::1" # default address
+ address = "::1" # default address
# convert [IPv6_addr] to IPv6_addr:
address = re.sub(r"\[(.+)\]", r"\1", address)
if port is None:
- port = 47806 # default port
+ port = 56176 # default port
return (address, port)
@step('An AXFR transfer of ([\w.]+)(?: from ([\d.]+|\[[0-9a-fA-F:]+\])(?::([0-9]+))?)?')
An AXFR transfer of <zone_name> [from <address>:<port>]
Address defaults to ::1
- Port defaults to 47806
+ Port defaults to 56176
"""
(address, port) = parse_addr_port(address, port)
args = [ 'dig', 'AXFR', '@' + str(address), '-p', str(port), zone_name ]
world.transfer_result = TransferResult(args)
-@step('A customized AXFR transfer of ([\w.]+)(?: from ([\d.]+|\[[0-9a-fA-F:]+\])(?::([0-9]+))?)?(?: with pose of (\d+) seconds?)?')
+@step('A customized AXFR transfer of ([\w.]+)(?: from ([\d.]+|\[[0-9a-fA-F:]+\])(?::([0-9]+))?)?(?: with pause of (\d+) seconds?)?')
def perform_custom_axfr(step, zone_name, address, port, delay):
"""Checks AXFR transfer, and store the result in the form of internal
CustomTransferResult class, which is compatible with TransferResult.
Step definition:
- A customized AXFR transfer of <zone_name> [from <address>:<port>] [with pose of <delay> second]
+ A customized AXFR transfer of <zone_name> [from <address>:<port>] [with pause of <delay> second]
If optional delay is specified (not None), it waits for the specified
seconds after sending the AXFR query before starting receiving
An IXFR transfer of <zone_name> <serial> [from <address>:port] [over <tcp|udp>]
Address defaults to 127.0.0.1
- Port defaults to 47806
+ Port defaults to 56176
If either tcp or udp is specified, only this protocol will be used.
"""
if address is None:
address = "127.0.0.1"
if port is None:
- port = 47806
+ port = 56176
args = [ 'dig', 'IXFR=' + str(serial), '@' + str(address), '-p', str(port), zone_name ]
if protocol is not None:
assert protocol == 'tcp' or protocol == 'udp', "Unknown protocol: " + protocol
# This file is actually automatically created.
The file data/test_nonexistent_db.sqlite3 should not exist
- Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 47804 as master
+ Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 56174 as master
And wait for master stderr message BIND10_STARTED_CC
And wait for master stderr message CMDCTL_STARTED
And wait for master stderr message AUTH_SERVER_STARTED
# The DB currently doesn't know anything about the zone, so we install
# an empty zone for xfrin.
The file data/test_nonexistent_db.sqlite3 should exist
- A query for www.example.org to [::1]:47806 should have rcode REFUSED
+ A query for www.example.org to [::1]:56176 should have rcode REFUSED
Then make empty zone example.org in DB file data/test_nonexistent_db.sqlite3
- When I send bind10 the command Xfrin retransfer example.org IN ::1 47807
+ When I send bind10 the command Xfrin retransfer example.org IN ::1 56177
# The data we receive contain a NS RRset that refers to three names in the
# example.org. zone. All these three are nonexistent in the data, producing
# 3 separate warning messages in the log.
# we can't reliably use 'wait for new'. In this case this should be the
# only occurrence of this message, so this should be okay.
Then wait for bind10 stderr message ZONEMGR_RECEIVE_XFRIN_SUCCESS
- A query for www.example.org to [::1]:47806 should have rcode NOERROR
+ A query for www.example.org to [::1]:56176 should have rcode NOERROR
# The transferred zone should have 11 non-NSEC3 RRs and 1 NSEC3 RR.
# The following check will get these by AXFR, so the total # of RRs
# Now try to offer another update. However, the validation of
# data should fail. The old version shoud still be available.
- When I send bind10 the following commands with cmdctl port 47804:
+ When I send bind10 the following commands with cmdctl port 56174:
"""
config set data_sources/classes/IN[0]/params/database_file data/example.org-nons.sqlite3
config set Auth/database_file data/example.org-nons.sqlite3
config commit
"""
- Then I send bind10 the command Xfrin retransfer example.org IN ::1 47807
+ Then I send bind10 the command Xfrin retransfer example.org IN ::1 56177
And wait for new bind10 stderr message XFRIN_ZONE_INVALID
And wait for new bind10 stderr message XFRIN_INVALID_ZONE_DATA
# We can't use 'wait for new' here; see above.
Then wait for bind10 stderr message ZONEMGR_RECEIVE_XFRIN_FAILED
- A query for example.org type NS to [::1]:47806 should have rcode NOERROR
+ A query for example.org type NS to [::1]:56176 should have rcode NOERROR
And transfer result should have 13 rrs
Scenario: Transfer with TSIG
# non-TSIG config, add TSIG on the master side, see it fail, add TSIG
# on the slave side, then check again.
- Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 47804 as master
+ Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 56174 as master
And wait for master stderr message AUTH_SERVER_STARTED
And wait for master stderr message XFROUT_STARTED
Then make empty zone example.org in DB file data/test_nonexistent_db.sqlite3
# Set slave config for 'automatic' xfrin
- When I set bind10 configuration Xfrin/zones to [{"master_port": 47806, "name": "example.org", "master_addr": "::1"}]
+ When I set bind10 configuration Xfrin/zones to [{"master_port": 56176, "name": "example.org", "master_addr": "::1"}]
# Make sure it is fully open
When I send bind10 the command Xfrin retransfer example.org
And wait for bind10 stderr message ZONEMGR_RECEIVE_XFRIN_SUCCESS
# First to master, a transfer should then fail
- When I send bind10 the following commands with cmdctl port 47804:
+ When I send bind10 the following commands with cmdctl port 56174:
"""
config add tsig_keys/keys "example.key.:c2VjcmV0"
config set Xfrout/zone_config[0]/transfer_acl [{"action": "ACCEPT", "from": "::1", "key": "example.key."}]
# do here).
The file data/test_nonexistent_db.sqlite3 should not exist
- Given I have bind10 running with configuration xfrin/retransfer_master_nons.conf with cmdctl port 47804 as master
+ Given I have bind10 running with configuration xfrin/retransfer_master_nons.conf with cmdctl port 56174 as master
And wait for master stderr message BIND10_STARTED_CC
And wait for master stderr message CMDCTL_STARTED
And wait for master stderr message AUTH_SERVER_STARTED
# Now we use the first step again to see if the file has been created,
# then install empty zone data
The file data/test_nonexistent_db.sqlite3 should exist
- A query for www.example.org to [::1]:47806 should have rcode REFUSED
+ A query for www.example.org to [::1]:56176 should have rcode REFUSED
Then make empty zone example.org in DB file data/test_nonexistent_db.sqlite3
- When I send bind10 the command Xfrin retransfer example.org IN ::1 47807
+ When I send bind10 the command Xfrin retransfer example.org IN ::1 56177
# It should complain once about invalid data, then again that the whole
# zone is invalid and then reject it.
And wait for new bind10 stderr message XFRIN_ZONE_INVALID
# The zone still doesn't exist as it is rejected.
# FIXME: This step fails. Probably an empty zone is created in the data
# source :-|. This should be REFUSED, not SERVFAIL.
- A query for www.example.org to [::1]:47806 should have rcode SERVFAIL
+ A query for www.example.org to [::1]:56176 should have rcode SERVFAIL
# TODO:
# * IXFR - generate an sqlite db that contains the journal. Check it was
# scenario. Just this time, the master contains the differences table
# and the slave has a previous version of the zone, so we use the IXFR.
- Given I have bind10 running with configuration xfrin/retransfer_master_diffs.conf with cmdctl port 47804 as master
+ Given I have bind10 running with configuration xfrin/retransfer_master_diffs.conf with cmdctl port 56174 as master
And wait for master stderr message BIND10_STARTED_CC
And wait for master stderr message CMDCTL_STARTED
And wait for master stderr message AUTH_SERVER_STARTED
And wait for bind10 stderr message XFRIN_STARTED
And wait for bind10 stderr message ZONEMGR_STARTED
- A query for example. type SOA to [::1]:47806 should have rcode NOERROR
+ A query for example. type SOA to [::1]:56176 should have rcode NOERROR
The answer section of the last query response should be
"""
example. 3600 IN SOA ns1.example. hostmaster.example. 94 3600 900 7200 300
"""
# To invoke IXFR we need to use refresh command
- When I send bind10 the command Xfrin refresh example. IN ::1 47807
+ When I send bind10 the command Xfrin refresh example. IN ::1 56177
Then wait for new bind10 stderr message XFRIN_GOT_INCREMENTAL_RESP
Then wait for new bind10 stderr message XFRIN_IXFR_TRANSFER_SUCCESS not XFRIN_XFR_PROCESS_FAILURE
# This can't be 'wait for new'
Then wait for bind10 stderr message ZONEMGR_RECEIVE_XFRIN_SUCCESS
- A query for example. type SOA to [::1]:47806 should have rcode NOERROR
+ A query for example. type SOA to [::1]:56176 should have rcode NOERROR
The answer section of the last query response should be
"""
example. 3600 IN SOA ns1.example. hostmaster.example. 100 3600 900 7200 300
server or slave server is unreachable.
Scenario: Handle incoming notify
- Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 47804 as master
+ Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 56174 as master
And wait for master stderr message BIND10_STARTED_CC
And wait for master stderr message CMDCTL_STARTED
And wait for master stderr message AUTH_SERVER_STARTED
And wait for bind10 stderr message XFRIN_STARTED
And wait for bind10 stderr message ZONEMGR_STARTED
- A query for www.example.org to [::1]:47806 should have rcode NXDOMAIN
+ A query for www.example.org to [::1]:56176 should have rcode NXDOMAIN
#
# Test1 for Xfrout statistics
#
- check initial statistics not containing example.org for Xfrout with cmdctl port 47804 except for the following items
+ check initial statistics not containing example.org for Xfrout with cmdctl port 56174 except for the following items
| item_name | min_value | max_value |
| socket.unixdomain.open | 0 | 1 |
# Note: .Xfrout.socket.unixdomain.open can be either expected to
# reason is same as the case of .Xfrout.socket.unixdomain.open. as described
# above.
- When I send bind10 with cmdctl port 47804 the command Xfrout notify example.org IN
+ When I send bind10 with cmdctl port 56174 the command Xfrout notify example.org IN
Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
Then wait for new bind10 stderr message AUTH_RECEIVED_NOTIFY
# From this point we can't reliably 'wait for new' because the ordering
Then wait for bind10 stderr message ZONEMGR_RECEIVE_XFRIN_SUCCESS
Then wait for master stderr message NOTIFY_OUT_REPLY_RECEIVED
- A query for www.example.org to [::1]:47806 should have rcode NOERROR
+ A query for www.example.org to [::1]:56176 should have rcode NOERROR
# Make sure handling statistics command handling checked below is
# after this query
And wait for bind10 stderr message AUTH_SEND_NORMAL_RESPONSE
#
# wait until the last stats requesting is finished
- When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
+ When I query statistics zones of bind10 module Xfrout with cmdctl port 56174
# note that this does not 100% guarantee the stats updated Xfrout
# statistics. But there doesn't seem to be a better log message that
# suggests this event.
wait for new master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND
last bindctl output should not contain "error"
- When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
+ When I query statistics zones of bind10 module Xfrout with cmdctl port 56174
The statistics counters are 0 in category .Xfrout.zones.IN except for the following items
| item_name | item_value |
| _SERVER_.notifyoutv6 | 1 |
| example.org..notifyoutv6 | 1 |
| example.org..xfrreqdone | 1 |
- When I query statistics socket of bind10 module Xfrout with cmdctl port 47804
+ When I query statistics socket of bind10 module Xfrout with cmdctl port 56174
The statistics counters are 0 in category .Xfrout.socket.unixdomain except for the following items
| item_name | item_value |
| open | 1 |
# Test for handling incoming notify only in IPv4
#
Scenario: Handle incoming notify (IPv4)
- Given I have bind10 running with configuration xfrin/retransfer_master_v4.conf with cmdctl port 47804 as master
+ Given I have bind10 running with configuration xfrin/retransfer_master_v4.conf with cmdctl port 56174 as master
And wait for master stderr message BIND10_STARTED_CC
And wait for master stderr message CMDCTL_STARTED
And wait for master stderr message AUTH_SERVER_STARTED
And wait for bind10 stderr message XFRIN_STARTED
And wait for bind10 stderr message ZONEMGR_STARTED
- A query for www.example.org to 127.0.0.1:47806 should have rcode NXDOMAIN
+ A query for www.example.org to 127.0.0.1:56176 should have rcode NXDOMAIN
#
# Test1 for Xfrout statistics
#
- check initial statistics not containing example.org for Xfrout with cmdctl port 47804 except for the following items
+ check initial statistics not containing example.org for Xfrout with cmdctl port 56174 except for the following items
| item_name | min_value | max_value |
| socket.unixdomain.open | 0 | 1 |
# Note: See above about .Xfrout.socket.unixdomain.open.
| axfr_running | 0 | 1 |
# Note: See above about soa_in_progress and axfr_running of Xfrin
- When I send bind10 with cmdctl port 47804 the command Xfrout notify example.org IN
+ When I send bind10 with cmdctl port 56174 the command Xfrout notify example.org IN
Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
Then wait for new bind10 stderr message AUTH_RECEIVED_NOTIFY
# From this point we can't reliably 'wait for new' because the ordering
Then wait for bind10 stderr message ZONEMGR_RECEIVE_XFRIN_SUCCESS
Then wait for master stderr message NOTIFY_OUT_REPLY_RECEIVED
- A query for www.example.org to 127.0.0.1:47806 should have rcode NOERROR
+ A query for www.example.org to 127.0.0.1:56176 should have rcode NOERROR
# Make sure handling statistics command handling checked below is
# after this query
And wait for bind10 stderr message AUTH_SEND_NORMAL_RESPONSE
#
# wait until the last stats requesting is finished
- When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
+ When I query statistics zones of bind10 module Xfrout with cmdctl port 56174
# note that this does not 100% guarantee the stats updated Xfrout
# statistics. But there doesn't seem to be a better log message that
# suggests this event.
wait for new master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND
last bindctl output should not contain "error"
- When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
+ When I query statistics zones of bind10 module Xfrout with cmdctl port 56174
The statistics counters are 0 in category .Xfrout.zones.IN except for the following items
| item_name | item_value |
| _SERVER_.notifyoutv4 | 1 |
| example.org..notifyoutv4 | 1 |
| example.org..xfrreqdone | 1 |
- When I query statistics socket of bind10 module Xfrout with cmdctl port 47804
+ When I query statistics socket of bind10 module Xfrout with cmdctl port 56174
The statistics counters are 0 in category .Xfrout.socket.unixdomain except for the following items
| item_name | item_value |
| open | 1 |
# Test for Xfr request rejected
#
Scenario: Handle incoming notify (XFR request rejected)
- Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 47804 as master
+ Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 56174 as master
And wait for master stderr message BIND10_STARTED_CC
And wait for master stderr message CMDCTL_STARTED
And wait for master stderr message AUTH_SERVER_STARTED
And wait for bind10 stderr message XFRIN_STARTED
And wait for bind10 stderr message ZONEMGR_STARTED
- A query for www.example.org to [::1]:47806 should have rcode NXDOMAIN
+ A query for www.example.org to [::1]:56176 should have rcode NXDOMAIN
#
# Test1 for Xfrout statistics
#
- check initial statistics not containing example.org for Xfrout with cmdctl port 47804 except for the following items
+ check initial statistics not containing example.org for Xfrout with cmdctl port 56174 except for the following items
| item_name | min_value | max_value |
| socket.unixdomain.open | 0 | 1 |
# Note: See above about .Xfrout.socket.unixdomain.open.
# set transfer_acl rejection
# Local xfr requests from Xfrin module would be rejected here.
#
- When I send bind10 the following commands with cmdctl port 47804
+ When I send bind10 the following commands with cmdctl port 56174
"""
config set Xfrout/zone_config[0]/transfer_acl [{"action": "REJECT", "from": "::1"}]
config commit
"""
last bindctl output should not contain Error
- When I send bind10 with cmdctl port 47804 the command Xfrout notify example.org IN
+ When I send bind10 with cmdctl port 56174 the command Xfrout notify example.org IN
Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
Then wait for new bind10 stderr message AUTH_RECEIVED_NOTIFY
# can't use 'wait for new' below.
Then wait for bind10 stderr message ZONEMGR_RECEIVE_XFRIN_FAILED not ZONEMGR_RECEIVE_XFRIN_SUCCESS
Then wait for master stderr message NOTIFY_OUT_REPLY_RECEIVED
- A query for www.example.org to [::1]:47806 should have rcode NXDOMAIN
+ A query for www.example.org to [::1]:56176 should have rcode NXDOMAIN
#
# Test3 for Xfrout statistics
#
# wait until the last stats requesting is finished
- When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
+ When I query statistics zones of bind10 module Xfrout with cmdctl port 56174
wait for new master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND
last bindctl output should not contain "error"
- When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
+ When I query statistics zones of bind10 module Xfrout with cmdctl port 56174
The statistics counters are 0 in category .Xfrout.zones.IN except for the following items
| item_name | item_value | min_value | max_value |
| _SERVER_.notifyoutv6 | 1 | | |
# up to 3. See this for details
# http://git.bind10.isc.org/~tester/builder/BIND10-lettuce/20120918210000-MacOS/logs/lettuce.out
- When I query statistics socket of bind10 module Xfrout with cmdctl port 47804
+ When I query statistics socket of bind10 module Xfrout with cmdctl port 56174
The statistics counters are 0 in category .Xfrout.socket.unixdomain except for the following items
| item_name | item_value |
| open | 1 |
# Test for Xfr request rejected in IPv4
#
Scenario: Handle incoming notify (XFR request rejected in IPv4)
- Given I have bind10 running with configuration xfrin/retransfer_master_v4.conf with cmdctl port 47804 as master
+ Given I have bind10 running with configuration xfrin/retransfer_master_v4.conf with cmdctl port 56174 as master
And wait for master stderr message BIND10_STARTED_CC
And wait for master stderr message CMDCTL_STARTED
And wait for master stderr message AUTH_SERVER_STARTED
And wait for bind10 stderr message XFRIN_STARTED
And wait for bind10 stderr message ZONEMGR_STARTED
- A query for www.example.org to 127.0.0.1:47806 should have rcode NXDOMAIN
+ A query for www.example.org to 127.0.0.1:56176 should have rcode NXDOMAIN
#
# Test1 for Xfrout statistics
#
- check initial statistics not containing example.org for Xfrout with cmdctl port 47804 except for the following items
+ check initial statistics not containing example.org for Xfrout with cmdctl port 56174 except for the following items
| item_name | min_value | max_value |
| socket.unixdomain.open | 0 | 1 |
# Note: See above about .Xfrout.socket.unixdomain.open.
# set transfer_acl rejection
# Local xfr requests from Xfrin module would be rejected here.
#
- When I send bind10 the following commands with cmdctl port 47804
+ When I send bind10 the following commands with cmdctl port 56174
"""
config set Xfrout/zone_config[0]/transfer_acl [{"action": "REJECT", "from": "127.0.0.1"}]
config commit
"""
last bindctl output should not contain Error
- When I send bind10 with cmdctl port 47804 the command Xfrout notify example.org IN
+ When I send bind10 with cmdctl port 56174 the command Xfrout notify example.org IN
Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
Then wait for new bind10 stderr message AUTH_RECEIVED_NOTIFY
# can't use 'wait for new' below.
Then wait for bind10 stderr message ZONEMGR_RECEIVE_XFRIN_FAILED not ZONEMGR_RECEIVE_XFRIN_SUCCESS
Then wait for master stderr message NOTIFY_OUT_REPLY_RECEIVED
- A query for www.example.org to 127.0.0.1:47806 should have rcode NXDOMAIN
+ A query for www.example.org to 127.0.0.1:56176 should have rcode NXDOMAIN
#
# Test3 for Xfrout statistics
# check statistics change
#
- When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
+ When I query statistics zones of bind10 module Xfrout with cmdctl port 56174
# wait until stats request at least after NOTIFY_OUT_REPLY_RECEIVED
wait for new master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND
last bindctl output should not contain "error"
- When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
+ When I query statistics zones of bind10 module Xfrout with cmdctl port 56174
The statistics counters are 0 in category .Xfrout.zones.IN except for the following items
| item_name | item_value | min_value | max_value |
| _SERVER_.notifyoutv4 | 1 | | |
# up to 3. See this for details
# http://git.bind10.isc.org/~tester/builder/BIND10-lettuce/20120918210000-MacOS/logs/lettuce.out
- When I query statistics socket of bind10 module Xfrout with cmdctl port 47804
+ When I query statistics socket of bind10 module Xfrout with cmdctl port 56174
The statistics counters are 0 in category .Xfrout.socket.unixdomain except for the following items
| item_name | item_value |
| open | 1 |
# Test for unreachable slave
#
Scenario: Handle incoming notify (unreachable slave)
- Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 47804 as master
+ Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 56174 as master
And wait for master stderr message BIND10_STARTED_CC
And wait for master stderr message CMDCTL_STARTED
And wait for master stderr message AUTH_SERVER_STARTED
And wait for master stderr message ZONEMGR_STARTED
And wait for master stderr message STATS_STARTING
- When I send bind10 with cmdctl port 47804 the command Xfrout notify example.org IN
+ When I send bind10 with cmdctl port 56174 the command Xfrout notify example.org IN
Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
Then wait for new master stderr message NOTIFY_OUT_SENDING_NOTIFY
Then wait for new master stderr message NOTIFY_OUT_TIMEOUT
# check statistics change
#
- When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
+ When I query statistics zones of bind10 module Xfrout with cmdctl port 56174
# wait until stats request at least after NOTIFY_OUT_TIMEOUT
wait for new master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND
last bindctl output should not contain "error"
- When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
+ When I query statistics zones of bind10 module Xfrout with cmdctl port 56174
The statistics counters are 0 in category .Xfrout.zones.IN except for the following items
| item_name | min_value | max_value |
| _SERVER_.notifyoutv6 | 1 | 5 |
| example.org..notifyoutv6 | 1 | 5 |
- When I query statistics socket of bind10 module Xfrout with cmdctl port 47804
+ When I query statistics socket of bind10 module Xfrout with cmdctl port 56174
The statistics counters are 0 in category .Xfrout.socket.unixdomain except for the following items
| item_name | item_value |
| open | 1 |
# Test for NOTIFY that would result in NOTAUTH
#
Scenario: Handle incoming notify that does match authoritative zones
- Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 47804 as master
+ Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 56174 as master
And wait for master stderr message BIND10_STARTED_CC
And wait for master stderr message CMDCTL_STARTED
And wait for master stderr message AUTH_SERVER_STARTED
# replace master's data source with unmatched zone for slave's zone.
# we restart Xfrout to make it sure.
#
- When I send bind10 the following commands with cmdctl port 47804
+ When I send bind10 the following commands with cmdctl port 56174
"""
config set data_sources/classes/IN[0]/params/database_file data/ixfr-out/zones.sqlite3
config set Auth/database_file data/ixfr-out/zones.sqlite3
last bindctl output should not contain "error"
And wait for new master stderr message XFROUT_STARTED
- A query for www.example.com to [::1]:47806 should have rcode REFUSED
+ A query for www.example.com to [::1]:56176 should have rcode REFUSED
- When I send bind10 with cmdctl port 47804 the command Xfrout notify example.com IN
+ When I send bind10 with cmdctl port 56174 the command Xfrout notify example.com IN
Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
Then wait for new bind10 stderr message AUTH_RECEIVED_NOTIFY_NOTAUTH
Then wait for new master stderr message NOTIFY_OUT_REPLY_RECEIVED
- A query for www.example.com to [::1]:47806 should have rcode REFUSED
+ A query for www.example.com to [::1]:56176 should have rcode REFUSED
#
# Test for NOTIFY that's not in the secondaries list
#
Scenario: Handle incoming notify that is not in the secondaries list
- Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 47804 as master
+ Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 56174 as master
And wait for master stderr message BIND10_STARTED_CC
And wait for master stderr message CMDCTL_STARTED
And wait for master stderr message AUTH_SERVER_STARTED
last bindctl output should not contain "error"
And wait for new bind10 stderr message ZONEMGR_STARTED
- A query for www.example.org to [::1]:47806 should have rcode NXDOMAIN
+ A query for www.example.org to [::1]:56176 should have rcode NXDOMAIN
- When I send bind10 with cmdctl port 47804 the command Xfrout notify example.org IN
+ When I send bind10 with cmdctl port 56174 the command Xfrout notify example.org IN
Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
Then wait for new bind10 stderr message AUTH_RECEIVED_NOTIFY
Then wait for new bind10 stderr message ZONEMGR_RECEIVE_NOTIFY
Then wait for new bind10 stderr message ZONEMGR_ZONE_NOTIFY_NOT_SECONDARY
Then wait for new master stderr message NOTIFY_OUT_REPLY_RECEIVED
- A query for www.example.org to [::1]:47806 should have rcode NXDOMAIN
+ A query for www.example.org to [::1]:56176 should have rcode NXDOMAIN
#
# Test for NOTIFY when zonemgr is not running
#
Scenario: Handle incoming notify while zonemgr is not running
- Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 47804 as master
+ Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 56174 as master
And wait for master stderr message BIND10_STARTED_CC
And wait for master stderr message CMDCTL_STARTED
And wait for master stderr message AUTH_SERVER_STARTED
last bindctl output should not contain "error"
And wait for new bind10 stderr message BIND10_PROCESS_ENDED
- A query for www.example.org to [::1]:47806 should have rcode NXDOMAIN
+ A query for www.example.org to [::1]:56176 should have rcode NXDOMAIN
- When I send bind10 with cmdctl port 47804 the command Xfrout notify example.org IN
+ When I send bind10 with cmdctl port 56174 the command Xfrout notify example.org IN
Then wait for master stderr message XFROUT_NOTIFY_COMMAND
Then wait for new bind10 stderr message AUTH_RECEIVED_NOTIFY
Then wait for new bind10 stderr message AUTH_ZONEMGR_NOTEXIST not AUTH_ZONEMGR_ERROR
Then wait for master stderr message NOTIFY_OUT_TIMEOUT not NOTIFY_OUT_REPLY_RECEIVED
- A query for www.example.org to [::1]:47806 should have rcode NXDOMAIN
+ A query for www.example.org to [::1]:56176 should have rcode NXDOMAIN
#
# Test for unreachable master
And wait for bind10 stderr message XFRIN_STARTED
And wait for bind10 stderr message ZONEMGR_STARTED
- A query for www.example.org to [::1]:47806 should have rcode NXDOMAIN
+ A query for www.example.org to [::1]:56176 should have rcode NXDOMAIN
#
# Test1 for Xfrin statistics
And wait for bind10 stderr message XFROUT_STARTED
And wait for bind10 stderr message ZONEMGR_STARTED
- When I do a customized AXFR transfer of example.org from [::1]:47806 with pose of 5 seconds
+ When I do a customized AXFR transfer of example.org from [::1]:56176 with pause of 5 seconds
Then transfer result should have 50001 rrs