Merge lp:~hggdh2/ubuntu-server-iso-testing/usit-mail-server into lp:ubuntu-server-iso-testing

Proposed by C de-Avillez
Status: Merged
Approved by: James Page
Approved revision: 223
Merged at revision: 223
Proposed branch: lp:~hggdh2/ubuntu-server-iso-testing/usit-mail-server
Merge into: lp:ubuntu-server-iso-testing
Diff against target: 23 lines (+11/-2)
1 file modified
templates/test_cases/mail-server/test (+11/-2)
To merge this branch: bzr merge lp:~hggdh2/ubuntu-server-iso-testing/usit-mail-server
Reviewer Review Type Date Requested Status
James Page Pending
Review via email: mp+67903@code.launchpad.net

Description of the change

Simple change, splitting the Dovecot check into IPv4 and IPv6. We are now enabling IPv6 by default on Oneiric.

To post a comment you must log in.
Revision history for this message
James Page (james-page) wrote :

Looks good to me - please feel free to merge with trunk.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'templates/test_cases/mail-server/test'
2--- templates/test_cases/mail-server/test 2010-12-01 17:48:05 +0000
3+++ templates/test_cases/mail-server/test 2011-07-13 21:27:30 +0000
4@@ -49,8 +49,17 @@
5 mbox = mailbox.mbox(spool_file)
6 self.assertEquals(len(mbox.keys()), 1, mbox)
7
8- def testDovecot(self):
9- cmd = ["netstat", "-ltnp"]
10+ def testDovecotTcp4(self):
11+ cmd = ["netstat", "-4", "-ltnp"]
12+ logging.debug("Cmd: %s" % (cmd))
13+ output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
14+ logging.debug("Cmd output: %s" % (output))
15+ output2 = filter(lambda l: l.split()[6].split('/')[1] == 'dovecot',
16+ output.strip().split('\n')[2:])
17+ self.assertEquals(len(output2), 4, output2)
18+
19+ def testDovecotTcp6(self):
20+ cmd = ["netstat", "-6", "-ltnp"]
21 logging.debug("Cmd: %s" % (cmd))
22 output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
23 logging.debug("Cmd output: %s" % (output))

Subscribers

People subscribed via source and target branches