BIND 10 trac930, updated. ced83a368040f132826daf0f8fc491e89f1fe904 [trac930] revise the entry of ChangeLog for trac928, trac929 and trac930
BIND 10 source code commits
bind10-changes at lists.isc.org
Tue Aug 9 06:57:17 UTC 2011
The branch, trac930 has been updated
discards 3e3f4cad1dd4068070cac2e322d070df563565eb (commit)
discards 81724ff9d7b84fffbef12d5fe29110ac648cc27f (commit)
discards 8d00801d054d1dcdfab031fcdff895a245299946 (commit)
discards b5f7d2f658eea96de478fdd93bf8829a3796e4e4 (commit)
discards 3e3b4e83da31e95a6b62361b79a7de8a4cec4825 (commit)
discards 41597849af52581a55896a1adec8e9730e1660fb (commit)
discards 7152b60e61796d94afc882b1b21c1d43a16971ce (commit)
discards 099b2f55652f9d930b7c130632bd4ef9368dc27b (commit)
discards eb1d8842771b797936e423a517ec6a23f6f46c1d (commit)
discards 8b973f544001cc9ae440f776bfb8bb86976a7410 (commit)
discards 7e05d2ecca76c9c0ff37d9e75c8d799834abede7 (commit)
discards e8bfaefe7e1a89c38fcfa07389795707542e30a7 (commit)
discards 3e5f7b8db4d92dd81ca8078380f13300ac4e2dad (commit)
discards 5a6e52a43b511c50444d57b2a39e882d6045f284 (commit)
discards 08d6bee9e8a64d9034d1526339fa7058cc47ec0e (commit)
discards fd00a47b22e779e8aab897ea2c347746493fd856 (commit)
discards 841ce466f7da2e69f64db2df000757d13390bd92 (commit)
discards f899d2da84eb0794e1871743a6ab0c47709e8abb (commit)
discards afbb0539629d9b8a6d056d9f507df47126339c65 (commit)
discards beb81dfe817b6e37d5861e3dfc56ca5cba61e03d (commit)
discards cf0dd1deccf98fbf891770237ab10001ceea0d5d (commit)
discards 5599adceb9df14b884f2f9fbf8495c514522862a (commit)
discards 02fd716235598062a85f5390696dbba38ef9ed09 (commit)
discards fc0dfceb6eacd6294ac7175b288354e89e1fd0ca (commit)
discards e2fb32f9a1445039e53fb25f8da55e0a66fcd969 (commit)
discards 13626af26c9827aa4ea01b9a02e7e46c19b10742 (commit)
discards 01aad4ccc702a40ce6dc87f9e3d3057346a4d2bf (commit)
discards 5386e91c0ad84e890176ac27466cc77cb4cfb07b (commit)
discards c84b1c33cbcfe13903c7b118f25199ec12263ecf (commit)
discards 5a06a689308cf93bab0376d14cd75ea2da98e70e (commit)
discards 49856af0435720158af25e8dbc27ad879a404ad9 (commit)
discards ffe7cc13b12bce0a36865c448222325720d84c0a (commit)
discards 01a624c91b204920ad0a562c947f8bc5f89ad28a (commit)
discards 4aaac79296588b0395ce0e9b77c5f2d5f31370b2 (commit)
discards 639d6e72a50bf429da4588d89c57a20a227da2c7 (commit)
discards 82dfd1f88136caad942d79ac0e45fdc7eef03b73 (commit)
discards 478b35c644a486fdc58708c85b318bbc86d59491 (commit)
discards f7c4cfed198d0d8b06bc05f43c9df8b39b5a6e16 (commit)
discards e657471f75d60643b5f608724313338081074b02 (commit)
via ced83a368040f132826daf0f8fc491e89f1fe904 (commit)
via 400d7bc238eab4335ab8ca7e54b6cd788848e61e (commit)
via 5438d88d968b32cdf6df2c1f0dfa5bd6d919bf51 (commit)
via 7d3137f7f0179d767797dd77e7e7b6315faac982 (commit)
via a5f71cf67d49406cd72d6b9b7e62284e4d6f0698 (commit)
via 3c94190a8441d021d18ed9fb0a97ee6c33c06f5c (commit)
via 271d1a86256ea6d6a03e1f9a9eeca4ffd4184c25 (commit)
via 1f9dc923c37b9939541912477867ce738c7a852d (commit)
via 940f9cfe99ce2a2d18f3cae5cef1b7f06b7e022e (commit)
via 679886f108588b7920342e47c59278733c649832 (commit)
via 8a174c278e26fc3615e5d45ae787080c04214186 (commit)
via 1c95d795cc7ba5ccff3a1d7344e179f3703e06be (commit)
via f59a43994babb4e45cc2c1d58970dda783b8cd70 (commit)
via d425049d0bd79aaa9a684e093edf3c59cb76ec6b (commit)
via 3d20458b7286e7605796f118f9408600bc156f84 (commit)
via 3e0e82ee8847e58db70380ba8491934793ed6464 (commit)
via ededbd7bee7b947a5c67f1182af9a7488ede5d34 (commit)
via d47292ef388ba0277d373bb5c606a2bdba74fb60 (commit)
via 45cc7d7032342fdc3ccff275f43bd21fb73295ac (commit)
via caa7d5289b0e13fc94a0c3590d80426400b0aecb (commit)
via 2347a66b1cf38ef9be15b426fb454905e10d2837 (commit)
via 78960d84a648d966137634f8c34e9907e6b26fbb (commit)
via 511907f71678284b24be5a26b14c9f4d88f5474e (commit)
via b5951b9135524fb64f1a0c10012d7ccbbfb5327c (commit)
via 1c54118918e40ac3737296ad73ada450e377394b (commit)
via d9574e5f5b892fc57a704875f6acc3e2dfd2e45c (commit)
via c9ff40c5e3948e242daa95b71c8812083780ef85 (commit)
via bdaa8a23fffcb134765a9ce111df9026b5fa2112 (commit)
via 6840ed899ff442f504cd4a874b6305d2fc3a83e1 (commit)
via 4034ce92cb567327bd22bf69797e9c85e739fc2a (commit)
via 15fa85f2568e8ec1c04660dd84b85456ef742a7e (commit)
via e797a46534105e6e98f813bd43b8ac040db56ea3 (commit)
via abba8ffdb5304af3ec00f738e4152c9fc6319d03 (commit)
via 0c9fe28c6fbc3e066ca429e13b639e9d37ea7763 (commit)
via d5e6f38c8a91b51078981e10a41bc433109e28de (commit)
via 0c79a09760fc7609c27a2210a66769b567aabf16 (commit)
via 8b5d3e59e153d2be6aa078b836dc01b7f0a821e3 (commit)
via 575499fb47935be7aa7a9dec42f8dfbc82075f01 (commit)
via 4608c1375bff6bafc3525d4e2844573dd039cc44 (commit)
via 41a507fd2ec327a65f25980d72dd0e9ef6575310 (commit)
via 221277c960c36686233a2f4479eb387d66d69ab8 (commit)
This update added new revisions after undoing existing revisions. That is
to say, the old revision is not a strict subset of the new revision. This
situation occurs when you --force push a change and generate a repository
containing something like this:
* -- * -- B -- O -- O -- O (3e3f4cad1dd4068070cac2e322d070df563565eb)
\
N -- N -- N (ced83a368040f132826daf0f8fc491e89f1fe904)
When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.
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 ced83a368040f132826daf0f8fc491e89f1fe904
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Tue Aug 9 15:57:22 2011 +0900
[trac930] revise the entry of ChangeLog for trac928, trac929 and trac930
commit 400d7bc238eab4335ab8ca7e54b6cd788848e61e
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Fri Aug 5 16:24:03 2011 +0900
[trac930]
- revise header comments in each test script
- replace some hard-coded time strings with the constants defined in the
setUp function
- merged several checks about B10_FROM_SOURCE into the TestOSEnv class
commit 5438d88d968b32cdf6df2c1f0dfa5bd6d919bf51
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Fri Aug 5 14:48:27 2011 +0900
[trac930]
- change address for test to 127.0.0.1 due to platform 127.0.0.2 can't be
assigned
- remove unnecessary thread.Event.wait()
- add thread.Event.clear() after thread.Event.wait()
commit 7d3137f7f0179d767797dd77e7e7b6315faac982
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Wed Aug 3 11:41:05 2011 +0900
[trac930] refactor unittests
- remove time.sleep from various unittests and add in the "run" method in
ThreadingServerManager
- adjust the sleep time (TIMEOUT_SEC)
- join some small unittests
(test_start_with_err, test_command_status, test_command_shutdown)
commit a5f71cf67d49406cd72d6b9b7e62284e4d6f0698
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Tue Aug 2 22:00:11 2011 +0900
[trac930] add comments about abstracts of the test scripts in their headers
commit 3c94190a8441d021d18ed9fb0a97ee6c33c06f5c
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Tue Aug 2 21:44:07 2011 +0900
[trac930] modify stats.py
- add more documentations into update_modules, get_statistics_data and
update_statistics_data methods
- modify two methods: "update_modules" and "get_statistics_data" methods raise
StatsError instead of just returning None, when communication between stats
module and config manager is failed or when it can't find specified
statistics data.
- also modify the unittest depending on the changes of these behaviors.
commit 271d1a86256ea6d6a03e1f9a9eeca4ffd4184c25
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Tue Aug 2 20:17:28 2011 +0900
[trac930] modify b10-stats_test.py
- set the constant variables in the setUp method in the TestUtilties class,
and compare values returned from the functions with these constants in
testing methods.
[trac930] remove the tearDown method which has no test case in the TestCallback
class
commit 1f9dc923c37b9939541912477867ce738c7a852d
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Tue Aug 2 19:57:58 2011 +0900
[trac930] remove tailing whitespaces.
commit 940f9cfe99ce2a2d18f3cae5cef1b7f06b7e022e
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Mon Aug 1 18:38:35 2011 +0900
[trac930] raise StatsError including errors in the stats spec file
commit 679886f108588b7920342e47c59278733c649832
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Mon Aug 1 18:21:23 2011 +0900
[trac930] rename the function name
- rename the name of 'parse_spec' to 'get_spec_defaults' in the result of
consideration of what it is doing
- modify the description of the function as docstring
- fix unitttests for the stats module depending on the function name
commit 8a174c278e26fc3615e5d45ae787080c04214186
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Fri Jul 29 22:11:38 2011 +0900
[trac930] remove a unnecessary x bit from stats_httpd.py.in
commit 1c95d795cc7ba5ccff3a1d7344e179f3703e06be
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Thu Jul 28 22:07:15 2011 +0900
[trac930] modify logging
add loggings and new messages for logging
remove unused messages from the message file
add test logging names into unittest scripts
commit f59a43994babb4e45cc2c1d58970dda783b8cd70
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Wed Jul 27 20:45:18 2011 +0900
[trac930] modify the update_modues function
There is no part of statistics category in the spec file of a module which has
no statistics data.
commit d425049d0bd79aaa9a684e093edf3c59cb76ec6b
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Wed Jul 27 16:49:21 2011 +0900
[trac930]
- correct error messages in bindctl
it prints together with arguments.
- modify the command_show function
it reports statistics data of the module even if name is not specified.
- add/modify unittests depending on the changes of error messages
commit 3d20458b7286e7605796f118f9408600bc156f84
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Wed Jul 27 16:42:54 2011 +0900
[trac930] remove unnecessary a white space
commit 3e0e82ee8847e58db70380ba8491934793ed6464
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Wed Jul 27 10:18:07 2011 +0900
[trac930] add a test pattern which the set command with a non-existent item
name is sent
commit ededbd7bee7b947a5c67f1182af9a7488ede5d34
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Wed Jul 27 10:14:57 2011 +0900
[trac930] modify parse_spec function
returns empty dict if list-type is not specified in the argument
commit d47292ef388ba0277d373bb5c606a2bdba74fb60
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Fri Jul 22 21:40:07 2011 +0900
[trac930] fix conflicts with trac1021
commit 45cc7d7032342fdc3ccff275f43bd21fb73295ac
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Fri Jul 22 18:50:41 2011 +0900
[trac930] add changes because query counter names described in the specfile are changed.
commit caa7d5289b0e13fc94a0c3590d80426400b0aecb
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Fri Jul 22 18:45:19 2011 +0900
[trac930] add the logging when the validation of statistics data fails
commit 2347a66b1cf38ef9be15b426fb454905e10d2837
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Fri Jul 22 18:43:26 2011 +0900
[trac930] Add unittests to test sumitStatistics with the validation of statistics data and add mock ModuleSpec class
commit 78960d84a648d966137634f8c34e9907e6b26fbb
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Fri Jul 22 18:41:34 2011 +0900
[trac930] Add prototypes of validator_typea and registerStatisticsValidator
- validator_type -- a type of statistics validation function
- registerStatisticsValidator -- the function to register the validation function
commit 511907f71678284b24be5a26b14c9f4d88f5474e
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Fri Jul 22 18:37:22 2011 +0900
[trac930]
- Add implementation to validate statistics data
-- When validation is success, it sends data to statistics module. But when it fails, it doesn't send and logs the message.
- Add the function to register the validation function into the class
commit b5951b9135524fb64f1a0c10012d7ccbbfb5327c
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Fri Jul 22 18:32:22 2011 +0900
[trac930] add the helper functions which are used around the registration of the function to validate the statistics data.
commit 1c54118918e40ac3737296ad73ada450e377394b
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Fri Jul 22 18:28:40 2011 +0900
[trac930] add new messages into the message file of Auth and Boss
when validation of statistics data to send to statistics module is failed.
commit d9574e5f5b892fc57a704875f6acc3e2dfd2e45c
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Wed Jul 20 10:00:29 2011 +0900
[trac930] add statistics validation for bob
commit c9ff40c5e3948e242daa95b71c8812083780ef85
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Wed Jul 13 20:25:54 2011 +0900
[trac930]
- increase seconds in sleep time which is before HTTP client connects to the server
- delete 'test_log_message' because of the deletion of original function
commit bdaa8a23fffcb134765a9ce111df9026b5fa2112
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Fri Jul 8 21:22:34 2011 +0900
[trac930] remove unneeded empty TODO comments
commit 6840ed899ff442f504cd4a874b6305d2fc3a83e1
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Fri Jul 8 21:09:41 2011 +0900
[trac930] add new entry for #928-#930
commit 4034ce92cb567327bd22bf69797e9c85e739fc2a
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Fri Jul 8 20:08:22 2011 +0900
[trac930] refurbish the unittests for new stats module, new stats httpd module
and new mockups and utilities in test_utils.py
commit 15fa85f2568e8ec1c04660dd84b85456ef742a7e
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Fri Jul 8 19:56:24 2011 +0900
[trac930] modify Stats
- remove unneeded subject and listener classes
- add StatsError for handling errors in Stats
- add some new methods (update_modules, update_statistics_data and
get_statistics_data)
- modify implementations of existent commands(show and set) according changes
stats.spec
- remove reset and remove command because stats module couldn't manage other
modules' statistics data schema
- add implementation of strict validation of each statistics data
(If the validation is failed, it puts out the error.)
- stats module shows its PID when status command invoked
- add new command showschema invokable via bindctl
- set command requires arguments of owner module name and statistics item name
- show and showschema commands accepts arguments of owner module name and
statistics item name
- exits at exit code 1 if got runtime errors
- has boot time in _BASETIME
commit e797a46534105e6e98f813bd43b8ac040db56ea3
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Fri Jul 8 19:40:15 2011 +0900
[trac930]
- remove "stats-schema.spec" setting and getting statistics data schema via
this spec file
- add "version" item in DEFAULT_CONFIG
- get the address family by socket.getaddrinfo function with specified
server_address in advance, and create HttpServer object once, in stead of
creating double HttpServer objects for IPv6 and IPv4 in the prior code
(It is aimed for avoiding to fail to close the once opened sockets.)
- open HTTP port in start method
- avoid calling config_handler recursively in the except statement
- create XML, XSD, XSL documents after getting statistics data and schema from
remote stats module via CC session
- definitely close once opened template file object
commit abba8ffdb5304af3ec00f738e4152c9fc6319d03
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Fri Jul 8 16:33:59 2011 +0900
[trac930] update spec file of stats module
- update description of status command, shutdown command and show command
- change argument of show command (Owner module name of statistics data can be
specified)
- change argument of set command (Owner module name of statistics data is
always required)
- add showschema command which shows statistics data schema of each module
specified)
- disabled reset command and remove command
commit 0c9fe28c6fbc3e066ca429e13b639e9d37ea7763
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Fri Jul 8 16:21:49 2011 +0900
[trac930] update argument name and argument format of set command in auth module and boss module
and also update related unittests of their modules
commit d5e6f38c8a91b51078981e10a41bc433109e28de
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Fri Jul 8 16:18:38 2011 +0900
[trac930] remove description about removing statistics data by stats module
update example format in bindctl when show command of stats module is invoked
commit 0c79a09760fc7609c27a2210a66769b567aabf16
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Fri Jul 8 16:13:17 2011 +0900
[trac930] add a column "Owner" in the table tag
commit 8b5d3e59e153d2be6aa078b836dc01b7f0a821e3
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Fri Jul 8 16:12:09 2011 +0900
[trac930] remove descriptions about "stats-schema.spec" and add description about new
features because stats module can be requested to show statistics data schema.
commit 575499fb47935be7aa7a9dec42f8dfbc82075f01
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Fri Jul 8 16:00:30 2011 +0900
[trac930] add utilities and mock-up modules for unittests of
statistics modules and change some environ variables (PYTHONPATH,
CONFIG_TESTDATA_PATH) in Makefile
test_utilies.py internally calls msgq, cfgmgr and some mock modules
with threads for as real situation as possible.
commit 4608c1375bff6bafc3525d4e2844573dd039cc44
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Fri Jul 8 15:57:41 2011 +0900
[trac930] remove unneeded mockups, fake modules and dummy data
commit 41a507fd2ec327a65f25980d72dd0e9ef6575310
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Fri Jul 8 15:55:55 2011 +0900
[trac930] remove unneeded specfile "stats-schema.spec"
commit 221277c960c36686233a2f4479eb387d66d69ab8
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Tue Aug 9 15:53:56 2011 +0900
[trac929]
consideration for buffer overflow
- use std::vector<char> instead of char[]
- use strncmp() instead of strcmp()
- shorten length of char array for the buffer
(not directly related to buffer overflow)
add more unittests for some wrong type formats into both c++ and python codes
(unittests for the previous change git e9620e0d9dd3d967bcfb99562f13848c70538a44)
- date-time-type format not ending with "Z"
- date-type format ending with "T"
- time-type format ending with "Z"
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 13 +++++--------
src/lib/config/module_spec.cc | 8 ++++----
src/lib/config/tests/module_spec_unittests.cc | 13 +++++++++++++
.../python/isc/config/tests/module_spec_test.py | 6 ++++++
4 files changed, 28 insertions(+), 12 deletions(-)
-----------------------------------------------------------------------
diff --git a/ChangeLog b/ChangeLog
index 38d572c..c102840 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,11 +1,8 @@
-xxx. [func] naokikambe
- Add statistics category in each module spec file for management of
- statistics data schemas by each module. Add get_statistics_spec into
- cfgmgr and related codes. show statistics data and data schema by each
- module via both bintcl and HTTP/XML interfaces. Change item name in
- each statistics data. (Remove prefix "xxx." indicating the module
- name.) Add new mock modules for unittests of stats and stats httpd
- modules.
+xxx. [func] naokikambe
+ Statistics items are specified by each module's spec file.
+ Stats module can read these through the config manager. Stats
+ module and stats httpd report statistics data and statistics
+ schema by each module via both bindctl and HTTP/XML.
(Trac #928,#929,#930, git nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn)
277. [func] jerry
diff --git a/src/lib/config/module_spec.cc b/src/lib/config/module_spec.cc
index 27cf993..bebe695 100644
--- a/src/lib/config/module_spec.cc
+++ b/src/lib/config/module_spec.cc
@@ -103,15 +103,15 @@ check_format(ConstElementPtr value, ConstElementPtr format_name) {
BOOST_FOREACH (const format_types::value_type& f, time_formats) {
if (format_name->stringValue() == f.first) {
struct tm tm;
- char buf[255] = "";
+ std::vector<char> buf(32);
memset(&tm, 0, sizeof(tm));
// reverse check
return (strptime(value->stringValue().c_str(),
f.second.c_str(), &tm) != NULL
- && strftime(buf, sizeof(buf),
+ && strftime(&buf[0], buf.size(),
f.second.c_str(), &tm) != 0
- && strcmp(value->stringValue().c_str(),
- buf) == 0);
+ && strncmp(value->stringValue().c_str(),
+ &buf[0], buf.size()) == 0);
}
}
return (false);
diff --git a/src/lib/config/tests/module_spec_unittests.cc b/src/lib/config/tests/module_spec_unittests.cc
index cfd0ff5..b2ca7b4 100644
--- a/src/lib/config/tests/module_spec_unittests.cc
+++ b/src/lib/config/tests/module_spec_unittests.cc
@@ -358,6 +358,19 @@ TEST(ModuleSpec, CheckFormat) {
item_format = "\"item_format\": \"time\"";
specs.push_back("," + item_default + item_format);
+ // wrong date-time-type format not ending with "Z"
+ item_default = "\"item_default\": \"2011-05-27T19:42:57\",";
+ item_format = "\"item_format\": \"date-time\"";
+ specs.push_back("," + item_default + item_format);
+ // wrong date-type format ending with "T"
+ item_default = "\"item_default\": \"2011-05-27T\",";
+ item_format = "\"item_format\": \"date\"";
+ specs.push_back("," + item_default + item_format);
+ // wrong time-type format ending with "Z"
+ item_default = "\"item_default\": \"19:42:57Z\",";
+ item_format = "\"item_format\": \"time\"";
+ specs.push_back("," + item_default + item_format);
+
BOOST_FOREACH(std::string s, specs) {
el = Element::fromJSON(json_begin + s + json_end)->get("module_spec");
EXPECT_THROW(ModuleSpec(el, true), ModuleSpecError);
diff --git a/src/lib/python/isc/config/tests/module_spec_test.py b/src/lib/python/isc/config/tests/module_spec_test.py
index 567cfd4..fc53d23 100644
--- a/src/lib/python/isc/config/tests/module_spec_test.py
+++ b/src/lib/python/isc/config/tests/module_spec_test.py
@@ -352,6 +352,12 @@ class TestModuleSpec(unittest.TestCase):
self.assertFalse(isc.config.module_spec._check_format('', 'date-time'))
self.assertFalse(isc.config.module_spec._check_format(None, 'date-time'))
self.assertFalse(isc.config.module_spec._check_format(None, None))
+ # wrong date-time-type format not ending with "Z"
+ self.assertFalse(isc.config.module_spec._check_format('2011-05-27T19:42:57', 'date-time'))
+ # wrong date-type format ending with "T"
+ self.assertFalse(isc.config.module_spec._check_format('2011-05-27T', 'date'))
+ # wrong time-type format ending with "Z"
+ self.assertFalse(isc.config.module_spec._check_format('19:42:57Z', 'time'))
def test_validate_type(self):
errors = []
More information about the bind10-changes
mailing list