~sseman/juju-chaos-monkey/add-shutdown

« back to all changes in this revision

Viewing changes to tests/test_net.py

  • Committer: seman.said at canonical
  • Date: 2015-05-10 21:54:17 UTC
  • mfrom: (6.1.2 description)
  • Revision ID: seman.said@canonical.com-20150510215417-7e6q1bp962sx7bxq
Added detailed descriptions for each chaos monkey command.

Show diffs side-by-side

added added

removed removed

Lines of Context:
105
105
 
106
106
    def test_create_chaos(self):
107
107
        net = Net()
108
 
        chaos = net.create_chaos('enable', 'disable', 'command')
 
108
        chaos = net.create_chaos('enable', 'disable', 'command', 'description')
109
109
        self.assertIs(type(chaos), Chaos)
110
110
        self.assertEqual(chaos.enable, 'enable')
111
111
        self.assertEqual(chaos.disable, 'disable')
112
112
        self.assertEqual(chaos.group, 'net')
113
113
        self.assertEqual(chaos.command_str, 'command')
 
114
        self.assertEqual(chaos.description, 'description')
114
115
 
115
116
    def test_shutdown(self):
116
117
        self._run_test('reset', ['ufw', 'reset'])
126
127
 
127
128
 
128
129
def get_all_net_commands():
129
 
    return ['deny-all', 'deny-incoming', 'deny-outgoing', 'allow-ssh',
130
 
            'deny-state-server', 'deny-api-server', 'deny-sys-log']
 
130
    return ['deny-all', 'deny-incoming', 'deny-outgoing',  'deny-state-server',
 
131
            'deny-api-server', 'deny-sys-log']