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
Sebastian Schrader
Kea
Commits
754c38ee
Commit
754c38ee
authored
Apr 12, 2013
by
Paul Selkirk
Browse files
[2832] roll back all of
946b1dfe
except typo fix
parent
946b1dfe
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/lib/datasrc/cache_config.cc
View file @
754c38ee
...
...
@@ -42,11 +42,7 @@ getSegmentTypeFromConf(const Element& conf) {
if
(
!
conf
.
contains
(
"cache-type"
))
{
return
(
"local"
);
}
std
::
string
cache_type
=
conf
.
get
(
"cache-type"
)
->
stringValue
();
if
((
cache_type
!=
"local"
)
&&
(
cache_type
!=
"mapped"
))
{
isc_throw
(
CacheConfigError
,
"invalid cache-type"
);
}
return
(
cache_type
);
return
(
conf
.
get
(
"cache-type"
)
->
stringValue
());
}
}
...
...
src/lib/datasrc/tests/cache_config_unittest.cc
View file @
754c38ee
...
...
@@ -238,13 +238,6 @@ TEST_F(CacheConfigTest, getSegmentType) {
"
\"
params
\"
: {}}"
));
EXPECT_THROW
(
CacheConfig
(
"MasterFiles"
,
0
,
*
badconfig
,
true
),
isc
::
data
::
TypeError
);
// Bad value: should be rejected at construction time
ConstElementPtr
badconfig2
(
Element
::
fromJSON
(
"{
\"
cache-enable
\"
: true,"
"
\"
cache-type
\"
:
\"
bogus
\"
,"
"
\"
params
\"
: {}}"
));
EXPECT_THROW
(
CacheConfig
(
"MasterFiles"
,
0
,
*
badconfig2
,
true
),
isc
::
datasrc
::
internal
::
CacheConfigError
);
}
}
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