~nskaggs/juju-ci-tools/keystone3

« back to all changes in this revision

Viewing changes to tests/test_assess_log_rotation.py

  • Committer: Martin Packman
  • Date: 2016-02-12 22:33:21 UTC
  • mto: This revision was merged to the branch mainline in revision 1270.
  • Revision ID: martin.packman@canonical.com-20160212223321-to246by216si6yse
Change test_debug_log as suggested by sinzui in review

Show diffs side-by-side

added added

removed removed

Lines of Context:
156
156
 
157
157
    def test_happy_log(self):
158
158
        client = Mock()
159
 
        client.get_juju_output.return_value = '\n'*1000
 
159
        client.get_juju_output.return_value = '\n'*100
160
160
        # Ensure that no exception is raised
161
161
        test_debug_log(client, timeout=120)
162
162
        client.get_juju_output.assert_called_once_with(
163
 
            "debug-log", "--lines=1000", "--limit=1000", timeout=120)
 
163
            "debug-log", "--lines=100", "--limit=100", timeout=120)
164
164
 
165
165
    def test_unhappy_log(self):
166
166
        client = Mock()
169
169
        with self.assertRaises(LogRotateError):
170
170
            test_debug_log(client)
171
171
        client.get_juju_output.assert_called_once_with(
172
 
            "debug-log", "--lines=1000", "--limit=1000", timeout=180)
 
172
            "debug-log", "--lines=100", "--limit=100", timeout=180)
173
173
 
174
174
 
175
175
class TestParseArgs(TestCase):