/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to mandos

  • Committer: Teddy Hogeborn
  • Date: 2019-07-29 16:35:53 UTC
  • Revision ID: teddy@recompile.se-20190729163553-1i442i2cbx64c537
Make tests and man page examples match

Make the tests test_manual_page_example[1-5] match exactly what is
written in the manual page, and add comments to manual page as
reminders to keep tests and manual page examples in sync.

* mandos-ctl (Test_commands_from_options.test_manual_page_example_1):
  Remove "--verbose" option, since the manual does not have it as the
  first example, and change assertion to match.
* mandos-ctl.xml (EXAMPLE): Add comments to all examples documenting
  which test function they correspond to.  Also remove unnecessary
  quotes from option arguments in fourth example, and clarify language
  slightly in fifth example.

Show diffs side-by-side

added added

removed removed

Lines of Context:
821
821
    approved:   bool(); 'None' if not yet approved/disapproved
822
822
    approval_delay: datetime.timedelta(); Time to wait for approval
823
823
    approval_duration: datetime.timedelta(); Duration of one approval
824
 
    checker: multiprocessing.Process(); a running checker process used
825
 
             to see if the client lives. 'None' if no process is
826
 
             running.
 
824
    checker:    subprocess.Popen(); a running checker process used
 
825
                                    to see if the client lives.
 
826
                                    'None' if no process is running.
827
827
    checker_callback_tag: a GLib event source tag, or None
828
828
    checker_command: string; External command which is run to check
829
829
                     if client lives.  %() expansions are done at
1036
1036
    def checker_callback(self, source, condition, connection,
1037
1037
                         command):
1038
1038
        """The checker has completed, so take appropriate actions."""
 
1039
        self.checker_callback_tag = None
 
1040
        self.checker = None
1039
1041
        # Read return code from connection (see call_pipe)
1040
1042
        returncode = connection.recv()
1041
1043
        connection.close()
1042
 
        self.checker.join()
1043
 
        self.checker_callback_tag = None
1044
 
        self.checker = None
1045
1044
 
1046
1045
        if returncode >= 0:
1047
1046
            self.last_checker_status = returncode