BIND 10 trac1788, updated. 81e1dca0c38590a5ea45ca4678e78e50dcc074de [1788] merge branch 'trac1788' with the remote side.
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Apr 4 17:22:30 UTC 2012
The branch, trac1788 has been updated
via 81e1dca0c38590a5ea45ca4678e78e50dcc074de (commit)
via 24e67649252ab7dbb1b1f7c943a995998c7f2052 (commit)
via def47e3b3de9e8bfa1fbf0bf1f2930281dce4c9b (commit)
via afd9a08917683d73f676637f22bbeee15ec68025 (commit)
via 36ec15a2721f408c1868001f8dfa4c358f2f0ec3 (commit)
from 04acab4dab20bc81a9bbaa57665381f4888f28f4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 81e1dca0c38590a5ea45ca4678e78e50dcc074de
Merge: 24e6764 04acab4
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Wed Apr 4 10:20:48 2012 -0700
[1788] merge branch 'trac1788' with the remote side.
(I'm not sure why that happened. The 'conflict' was effectively empty.
maybe it was because I editted the commit log after git rebase -i?)
commit 24e67649252ab7dbb1b1f7c943a995998c7f2052
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Wed Apr 4 10:11:36 2012 -0700
[1788] removed the default for 'filetype' from the spec file.
for optional items setting the default doesn't make sense, but we also have
test cases where syntax validation is skipped, so changing it to non-optional
will break existing test cases. at least for now, it seems to make most sense
to keep it optional and define the default within the parser code.
commit def47e3b3de9e8bfa1fbf0bf1f2930281dce4c9b
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Wed Apr 4 09:56:44 2012 -0700
[master] [1788] used a simpler version of validateConfig() (not taking 'errors' list).
in this test we are only interested in the specific config is valid or not,
so we didn't need the 'errors'. (actually I didn't notice there was this
version of validateConfig() previously).
commit afd9a08917683d73f676637f22bbeee15ec68025
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Tue Apr 3 21:05:33 2012 -0700
[master] [1788] reject in-memory file types other than "text" for now.
commit 36ec15a2721f408c1868001f8dfa4c358f2f0ec3
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Tue Apr 3 20:49:22 2012 -0700
[1788] more test, syntax cleanup
- added one test case for checking the new "filetype" item is optional.
- also added a test in MemoryDatasrcConfigTest to see whether "filetype" is
accepted.
- others should be trivial editorial cleanup.
-----------------------------------------------------------------------
Summary of changes:
src/bin/auth/auth.spec.pre.in | 3 +--
src/bin/auth/auth_config.cc | 1 -
src/bin/auth/tests/config_syntax_unittest.cc | 13 ++++---------
3 files changed, 5 insertions(+), 12 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/auth/auth.spec.pre.in b/src/bin/auth/auth.spec.pre.in
index 71f4863..3eeb35e 100644
--- a/src/bin/auth/auth.spec.pre.in
+++ b/src/bin/auth/auth.spec.pre.in
@@ -50,8 +50,7 @@
},
{ "item_name": "filetype",
"item_type": "string",
- "item_optional": true,
- "item_default": "text"
+ "item_optional": true
}]
}
}]
diff --git a/src/bin/auth/auth_config.cc b/src/bin/auth/auth_config.cc
index af7ae0a..3b391d3 100644
--- a/src/bin/auth/auth_config.cc
+++ b/src/bin/auth/auth_config.cc
@@ -165,7 +165,6 @@ MemoryDatasourceConfig::build(ConstElementPtr config_value) {
isc_throw(AuthConfigError, "Missing zone file for zone: "
<< origin_txt);
}
- // XXX: we need to hardcode the default, see above.
ConstElementPtr filetype = zone_config->get("filetype");
const string filetype_txt = filetype ? filetype->stringValue() :
"text";
diff --git a/src/bin/auth/tests/config_syntax_unittest.cc b/src/bin/auth/tests/config_syntax_unittest.cc
index 4c99c26..8caedfd 100644
--- a/src/bin/auth/tests/config_syntax_unittest.cc
+++ b/src/bin/auth/tests/config_syntax_unittest.cc
@@ -26,11 +26,9 @@ const char* const SPEC_FILE = AUTH_OBJ_DIR "/auth.spec";
class AuthConfigSyntaxTest : public ::testing::Test {
protected:
- AuthConfigSyntaxTest() : mspec_(moduleSpecFromFile(SPEC_FILE)),
- errors_(Element::createList())
+ AuthConfigSyntaxTest() : mspec_(moduleSpecFromFile(SPEC_FILE))
{}
ModuleSpec mspec_;
- ElementPtr errors_;
};
TEST_F(AuthConfigSyntaxTest, inmemoryDefaultFileType) {
@@ -42,8 +40,7 @@ TEST_F(AuthConfigSyntaxTest, inmemoryDefaultFileType) {
" [{\"type\": \"memory\", \"class\": \"IN\", "
" \"zones\": [{\"origin\": \"example.com\","
" \"file\": \""
- TEST_DATA_DIR "/example.zone\"}]}]}"),
- true, errors_));
+ TEST_DATA_DIR "/example.zone\"}]}]}"), true));
}
TEST_F(AuthConfigSyntaxTest, inmemorySQLite3Backend) {
@@ -56,8 +53,7 @@ TEST_F(AuthConfigSyntaxTest, inmemorySQLite3Backend) {
" \"zones\": [{\"origin\": \"example.com\","
" \"file\": \""
TEST_DATA_DIR "/example.zone\","
- " \"filetype\": \"sqlite3\"}]}]}"),
- false, errors_));
+ " \"filetype\": \"sqlite3\"}]}]}"), false));
}
TEST_F(AuthConfigSyntaxTest, badInmemoryFileType) {
@@ -70,7 +66,6 @@ TEST_F(AuthConfigSyntaxTest, badInmemoryFileType) {
" \"zones\": [{\"origin\": \"example.com\","
" \"file\": \""
TEST_DATA_DIR "/example.zone\","
- " \"filetype\": 42}]}]}"),
- false, errors_));
+ " \"filetype\": 42}]}]}"), false));
}
}
More information about the bind10-changes
mailing list