~tvansteenburgh/charms/precise/haproxy/sticky-sessions

« back to all changes in this revision

Viewing changes to hooks/tests/test_peer_hooks.py

  • Committer: Marco Ceppi
  • Date: 2014-01-24 12:44:31 UTC
  • mfrom: (74.1.7 fix-service-entries)
  • Revision ID: marco@ceppi.net-20140124124431-xbgxxhdxcu9qkv6y
[davidpbritton] Add test case and fix for backend "server" entries not getting unioned, when multiple units join the relation

Show diffs side-by-side

added added

removed removed

Lines of Context:
195
195
                hooks.write_service_config(services_dict)
196
196
 
197
197
                create_listen_stanza.assert_called_with(
198
 
                    'bar', 'some-host', 'some-port', 'some-options', (1, 2), [])
 
198
                    'bar', 'some-host', 'some-port', 'some-options',
 
199
                    (1, 2), [])
199
200
                mock_open.assert_called_with(
200
201
                    '/var/run/haproxy/bar.service', 'w')
201
202
                mock_file.write.assert_called_with('some content')
231
232
                    '/var/lib/haproxy/service_bar/403.http', 'w')
232
233
                mock_file.write.assert_any_call(content)
233
234
        self.assertTrue(create_listen_stanza.called)
234