Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
02e2f3a3
Commit
02e2f3a3
authored
May 13, 2011
by
Michal 'vorner' Vaner
Browse files
[trac922] Test for module name add
parent
54210ba4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/config/tests/ccsession_unittests.cc
View file @
02e2f3a3
...
...
@@ -392,6 +392,24 @@ TEST_F(CCSessionTest, remoteConfig) {
session
.
getMessages
()
->
add
(
createAnswer
());
EXPECT_THROW
(
mccs
.
addRemoteConfig
(
ccspecfile
(
"spec2.spec"
)),
CCSessionError
);
{
SCOPED_TRACE
(
"With module name"
);
// Try adding it with downloading the spec from config manager
ModuleSpec
spec
(
moduleSpecFromFile
(
ccspecfile
(
"spec2.spec"
)));
session
.
getMessages
()
->
add
(
createAnswer
(
0
,
spec
.
getFullSpec
()));
session
.
getMessages
()
->
add
(
createAnswer
(
0
,
el
(
"{}"
)));
EXPECT_NO_THROW
(
module_name
=
mccs
.
addRemoteConfig
(
"Spec2"
));
EXPECT_EQ
(
"Spec2"
,
module_name
);
EXPECT_NO_THROW
(
item1
=
mccs
.
getRemoteConfigValue
(
module_name
,
"item1"
)
->
intValue
());
EXPECT_EQ
(
1
,
item1
);
mccs
.
removeRemoteConfig
(
module_name
);
}
}
TEST_F
(
CCSessionTest
,
ignoreRemoteConfigCommands
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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