Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
20e1bd77
Commit
20e1bd77
authored
Mar 16, 2012
by
JINMEI Tatuya
Browse files
[1784] removed the "test_mode" kludge in portconfig.
thanks to the introduction of DNSServiceBase we don't need it any more.
parent
c4e3eaef
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/lib/server_common/portconfig.cc
View file @
20e1bd77
...
...
@@ -31,11 +31,6 @@ namespace isc {
namespace
server_common
{
namespace
portconfig
{
// This flags disables pushing the sockets to the DNSService. It prevents
// the clearServers() method to close the file descriptors we made up.
// It is not presented in any header, but we use it from the tests anyway.
bool
test_mode
(
false
);
AddressList
parseAddresses
(
isc
::
data
::
ConstElementPtr
addresses
,
const
std
::
string
&
elemName
)
...
...
src/lib/server_common/tests/portconfig_unittest.cc
View file @
20e1bd77
...
...
@@ -14,6 +14,7 @@
#include <server_common/portconfig.h>
#include <testutils/socket_request.h>
#include <testutils/mockups.h>
#include <cc/data.h>
#include <exceptions/exceptions.h>
...
...
@@ -30,6 +31,7 @@ using namespace isc;
using
namespace
std
;
using
namespace
isc
::
asiolink
;
using
namespace
isc
::
asiodns
;
using
namespace
isc
::
testutils
;
using
boost
::
lexical_cast
;
namespace
{
...
...
@@ -132,7 +134,6 @@ TEST_F(ParseAddresses, invalid) {
// Test fixture for installListenAddresses
struct
InstallListenAddresses
:
public
::
testing
::
Test
{
InstallListenAddresses
()
:
dnss_
(
ios_
,
NULL
,
NULL
,
NULL
),
// The empty string is expected parameter of requestSocket,
// not app_name - the request does not fall back to this, it
// is checked to be the same.
...
...
@@ -143,8 +144,7 @@ struct InstallListenAddresses : public ::testing::Test {
invalid_
.
push_back
(
AddressPair
(
"127.0.0.1"
,
5288
));
invalid_
.
push_back
(
AddressPair
(
"192.0.2.2"
,
1
));
}
IOService
ios_
;
DNSService
dnss_
;
MockDNSService
dnss_
;
AddressList
store_
;
isc
::
testutils
::
TestSocketRequestor
sock_requestor_
;
// We should be able to bind to these addresses
...
...
src/lib/testutils/socket_request.h
View file @
20e1bd77
...
...
@@ -27,13 +27,6 @@
#include <string>
namespace
isc
{
namespace
server_common
{
namespace
portconfig
{
// Access the private hidden flag
extern
bool
test_mode
;
}
}
namespace
testutils
{
/// \brief A testcase part for faking the SocketRequestor in tests
...
...
@@ -77,8 +70,6 @@ public:
{
// Prepare the requestor (us) for the test
server_common
::
initTestSocketRequestor
(
this
);
// Don't manipulate the real sockets
server_common
::
portconfig
::
test_mode
=
true
;
}
/// \brief Destructor
...
...
@@ -93,8 +84,6 @@ public:
server_common
::
portconfig
::
installListenAddresses
(
list
,
store_
,
dnss_
);
// Don't leave invalid pointers here
server_common
::
initTestSocketRequestor
(
NULL
);
// And return the mode
server_common
::
portconfig
::
test_mode
=
false
;
}
/// \brief Tokens released by releaseSocket
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment