Commit 8c7144c6 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[trac523] Change test ports to 53210

This is in the private range, so it should not conflict with anything
(we still might be unlucky if two tests run at the same time, but the
chance is low).
parent 8ffbcda5
......@@ -77,7 +77,7 @@ protected:
dummy_socket(IOSocket::getDummyUDPSocket()),
dummy_endpoint(IOEndpointPtr(IOEndpoint::create(IPPROTO_UDP,
IOAddress("192.0.2.1"),
5300)))
53210)))
{}
public:
unsigned int run() {
......
......@@ -644,7 +644,7 @@ TEST_F(AuthSrvTest, queryCounterUnexpected) {
// Modify the message.
delete io_message;
endpoint = IOEndpoint::create(IPPROTO_UDP,
IOAddress(DEFAULT_REMOTE_ADDRESS), 5300);
IOAddress(DEFAULT_REMOTE_ADDRESS), 53210);
io_message = new IOMessage(request_renderer.getData(),
request_renderer.getLength(),
getDummyUnknownSocket(), *endpoint);
......
......@@ -27,7 +27,7 @@ const char* const TEST_IPV4_ADDR = "127.0.0.1";
TEST(IOServiceTest, badPort) {
IOService io_service;
EXPECT_THROW(DNSService(io_service, *"65536", true, false, NULL, NULL, NULL), IOError);
EXPECT_THROW(DNSService(io_service, *"5300.0", true, false, NULL, NULL, NULL), IOError);
EXPECT_THROW(DNSService(io_service, *"53210.0", true, false, NULL, NULL, NULL), IOError);
EXPECT_THROW(DNSService(io_service, *"-1", true, false, NULL, NULL, NULL), IOError);
EXPECT_THROW(DNSService(io_service, *"domain", true, false, NULL, NULL, NULL), IOError);
}
......
......@@ -21,9 +21,9 @@ using namespace asiolink;
TEST(IOEndpointTest, createUDPv4) {
const IOEndpoint* ep;
ep = IOEndpoint::create(IPPROTO_UDP, IOAddress("192.0.2.1"), 5300);
ep = IOEndpoint::create(IPPROTO_UDP, IOAddress("192.0.2.1"), 53210);
EXPECT_EQ("192.0.2.1", ep->getAddress().toText());
EXPECT_EQ(5300, ep->getPort());
EXPECT_EQ(53210, ep->getPort());
EXPECT_EQ(AF_INET, ep->getFamily());
EXPECT_EQ(AF_INET, ep->getAddress().getFamily());
EXPECT_EQ(IPPROTO_UDP, ep->getProtocol());
......@@ -61,7 +61,7 @@ TEST(IOEndpointTest, createTCPv6) {
TEST(IOEndpointTest, createIPProto) {
EXPECT_THROW(IOEndpoint::create(IPPROTO_IP, IOAddress("192.0.2.1"),
5300)->getAddress().toText(),
53210)->getAddress().toText(),
IOError);
}
......@@ -51,8 +51,8 @@ listenAddresses(Server& server) {
// Try putting there some addresses
AddressList addresses;
addresses.push_back(AddressPair("127.0.0.1", 5321));
addresses.push_back(AddressPair("::1", 5321));
addresses.push_back(AddressPair("127.0.0.1", 53210));
addresses.push_back(AddressPair("::1", 53210));
server.setListenAddresses(addresses);
EXPECT_EQ(2, server.getListenAddresses().size());
EXPECT_EQ("::1", server.getListenAddresses()[1].first);
......@@ -88,7 +88,7 @@ listenAddressConfig(Server& server) {
"\"listen_on\": ["
" {"
" \"address\": \"127.0.0.1\","
" \"port\": 5321"
" \"port\": 53210"
" }"
"]"
"}"));
......@@ -96,7 +96,7 @@ listenAddressConfig(Server& server) {
EXPECT_EQ(result->toWire(), isc::config::createAnswer()->toWire());
ASSERT_EQ(1, server.getListenAddresses().size());
EXPECT_EQ("127.0.0.1", server.getListenAddresses()[0].first);
EXPECT_EQ(5321, server.getListenAddresses()[0].second);
EXPECT_EQ(53210, server.getListenAddresses()[0].second);
// As this is example address, the machine should not have it on
// any interface
......@@ -107,7 +107,7 @@ listenAddressConfig(Server& server) {
"\"listen_on\": ["
" {"
" \"address\": \"192.0.2.0\","
" \"port\": 5321"
" \"port\": 53210"
" }"
"]"
"}");
......@@ -115,7 +115,7 @@ listenAddressConfig(Server& server) {
EXPECT_FALSE(result->equals(*isc::config::createAnswer()));
ASSERT_EQ(1, server.getListenAddresses().size());
EXPECT_EQ("127.0.0.1", server.getListenAddresses()[0].first);
EXPECT_EQ(5321, server.getListenAddresses()[0].second);
EXPECT_EQ(53210, server.getListenAddresses()[0].second);
}
......
......@@ -60,7 +60,7 @@ SrvTestBase::createDataFromFile(const char* const datafile,
delete endpoint;
endpoint = IOEndpoint::create(protocol,
IOAddress(DEFAULT_REMOTE_ADDRESS), 5300);
IOAddress(DEFAULT_REMOTE_ADDRESS), 53210);
UnitTestUtil::readWireData(datafile, data);
io_sock = (protocol == IPPROTO_UDP) ? &IOSocket::getDummyUDPSocket() :
&IOSocket::getDummyTCPSocket();
......@@ -76,7 +76,7 @@ SrvTestBase::createRequestPacket(Message& message,
delete io_message;
endpoint = IOEndpoint::create(protocol,
IOAddress(DEFAULT_REMOTE_ADDRESS), 5300);
IOAddress(DEFAULT_REMOTE_ADDRESS), 53210);
io_sock = (protocol == IPPROTO_UDP) ? &IOSocket::getDummyUDPSocket() :
&IOSocket::getDummyTCPSocket();
io_message = new IOMessage(request_renderer.getData(),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment