BIND 10 trac2712, updated. a6e56d56d0a24ba1b8ce4c77f3ae7eddf56c7d24 [2712] updated docstring for ignore_failure so it'll be less confusing.

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Apr 25 21:02:22 UTC 2013


The branch, trac2712 has been updated
       via  a6e56d56d0a24ba1b8ce4c77f3ae7eddf56c7d24 (commit)
       via  e2d04f2d4343bf4c9bf8384f44187145c76d1717 (commit)
       via  f0f403fc8e950db97ddb71a0fe1ba2fc9ab13b3f (commit)
      from  cacb5d70d80379f908b368f933b72815393beed0 (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 a6e56d56d0a24ba1b8ce4c77f3ae7eddf56c7d24
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Thu Apr 25 14:01:46 2013 -0700

    [2712] updated docstring for ignore_failure so it'll be less confusing.

commit e2d04f2d4343bf4c9bf8384f44187145c76d1717
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Thu Apr 25 13:56:49 2013 -0700

    [2712] corrected a typo in a comment line.

commit f0f403fc8e950db97ddb71a0fe1ba2fc9ab13b3f
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Thu Apr 25 13:54:40 2013 -0700

    [2712] removed a meaningless test case.
    
    it's a leftover of an intermediate attempt of testing the case; on a closer
    look, testing send_command turned out to be better and sufficient.

-----------------------------------------------------------------------

Summary of changes:
 src/bin/cmdctl/tests/cmdctl_test.py              |    8 --------
 tests/lettuce/features/bindctl_commands.feature  |    2 +-
 tests/lettuce/features/terrain/bind10_control.py |    7 +++++--
 3 files changed, 6 insertions(+), 11 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/cmdctl/tests/cmdctl_test.py b/src/bin/cmdctl/tests/cmdctl_test.py
index 98f8e6a..4a6b0e3 100644
--- a/src/bin/cmdctl/tests/cmdctl_test.py
+++ b/src/bin/cmdctl/tests/cmdctl_test.py
@@ -311,14 +311,6 @@ class TestSecureHTTPRequestHandler(unittest.TestCase):
         rcode, reply = self.handler._handle_post_request()
         self.assertEqual(http.client.BAD_REQUEST, rcode)
 
-    def test_handle_post_request_to_itself(self):
-        len = self.handler.rfile.write(json.dumps({}).encode())
-        self.handler.headers['Content-Length'] = len
-        self.handler.rfile.seek(0, 0)
-        self.handler.path = '/Cmdctl/shutdown'
-        rcode, reply = self.handler._handle_post_request()
-        self.assertEqual(http.client.BAD_REQUEST, rcode)
-
     def test_handle_login(self):
         orig_is_user_logged_in = self.handler._is_user_logged_in
         orig_check_user_name_and_pwd = self.handler._check_user_name_and_pwd
diff --git a/tests/lettuce/features/bindctl_commands.feature b/tests/lettuce/features/bindctl_commands.feature
index 2116e6c..a7a455a 100644
--- a/tests/lettuce/features/bindctl_commands.feature
+++ b/tests/lettuce/features/bindctl_commands.feature
@@ -161,7 +161,7 @@ Feature: control with bindctl
         # so this scenario confirms it's certainly fixed.  Note: since cmdctl
         # is a "needed" component, shutting it down will result in system
         # shutdown.  So "send bind10 command" will fail (it cannot complete
-        # "quite").
+        # "quit").
         Given I have bind10 running with configuration bindctl/bindctl.config
         And wait for bind10 stderr message BIND10_STARTED_CC
         And wait for bind10 stderr message CMDCTL_STARTED
diff --git a/tests/lettuce/features/terrain/bind10_control.py b/tests/lettuce/features/terrain/bind10_control.py
index 7dd7b3e..d32cd20 100644
--- a/tests/lettuce/features/terrain/bind10_control.py
+++ b/tests/lettuce/features/terrain/bind10_control.py
@@ -127,6 +127,8 @@ def run_bindctl(commands, cmdctl_port=None, ignore_failure=False):
        cmdctl_port: a port number on which cmdctl is listening, is converted
                     to string if necessary. If not provided, or None, defaults
                     to 47805
+       ignore_failure(bool): if set to True, don't examin the result code
+                    of bindctl and assert it succeeds.
 
        bindctl's stdout and stderr streams are stored (as one multiline string
        in world.last_bindctl_stdout/stderr.
@@ -316,8 +318,9 @@ def send_command(step, cmdctl_port, ignore_failure, command):
     command ('the command <command>'): The command to send.
     cmdctl_port ('with cmdctl port <portnr>', optional): cmdctl port to send
                 the command to. Defaults to 47805.
-    ignore_failure ('ignoring failure', optional): set to not None if bindctl
-    is expected to fail (and it's acceptable).
+    ignore_failure ('ignoring failure', optional): set to None if bindctl
+    is expected to succeed (normal case, which is the default); if it is
+    not None, it means bindctl is expected to fail (and it's acceptable).
 
     Fails if bindctl does not exit with status code 0 and ignore_failure
     is not None.



More information about the bind10-changes mailing list