Merge lp:~james-page/ubuntu-test-cases/server-drop-floodlight into lp:ubuntu-test-cases/server

Proposed by James Page
Status: Merged
Merge reported by: James Page
Merged at revision: not available
Proposed branch: lp:~james-page/ubuntu-test-cases/server-drop-floodlight
Merge into: lp:ubuntu-test-cases/server
Diff against target: 222 lines (+0/-169)
9 files modified
runlists/floodlight.run (+0/-5)
testsuites/floodlight/tcleanup/cleanup.sh (+0/-6)
testsuites/floodlight/test_daemons/tc_control (+0/-10)
testsuites/floodlight/test_daemons/test.py (+0/-59)
testsuites/floodlight/test_openflow/tc_control (+0/-12)
testsuites/floodlight/test_openflow/test.py (+0/-61)
testsuites/floodlight/ts_control (+0/-3)
testsuites/floodlight/tsetup/setup.sh (+0/-11)
testsuites/floodlight/tslist.run (+0/-2)
To merge this branch: bzr merge lp:~james-page/ubuntu-test-cases/server-drop-floodlight
Reviewer Review Type Date Requested Status
Para Siva (community) Approve
Ubuntu Server Developers Pending
Review via email: mp+196511@code.launchpad.net

Description of the change

Drop floodlight test as I've superseded it with a DEP-8 gated test instead.

To post a comment you must log in.
Revision history for this message
Para Siva (psivaa) wrote :

+1.

PS:
<psivaa> jamespage: ok, I see this DEP-8 tests are not run in smoke, but that's intended and you're running it somewhere else?
<jamespage> psivaa, yes - they will get run when its reverse-deps change or when its uploaded to distro
<jamespage> so its pre-entry rather than post entry if that makes sense

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== removed symlink 'preseeds/floodlight.preseed'
=== target was u'default.preseed'
=== removed file 'runlists/floodlight.run'
--- runlists/floodlight.run 2013-02-11 09:35:47 +0000
+++ runlists/floodlight.run 1970-01-01 00:00:00 +0000
@@ -1,5 +0,0 @@
1testsuites:
2 - name: floodlight
3 fetch_method: bzr-export
4 fetch_location: lp:ubuntu-test-cases/server/testsuites/floodlight/
5
60
=== removed symlink 'scripts/floodlight.sh'
=== target was u'default.sh'
=== removed directory 'testsuites/floodlight'
=== removed directory 'testsuites/floodlight/tcleanup'
=== removed file 'testsuites/floodlight/tcleanup/cleanup.sh'
--- testsuites/floodlight/tcleanup/cleanup.sh 2012-09-21 09:09:54 +0000
+++ testsuites/floodlight/tcleanup/cleanup.sh 1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
1#!/bin/bash
2
3set -ex
4
5apt-get -yy purge floodlight mininet iperf
6apt-get -yy autoremove --purge
70
=== removed directory 'testsuites/floodlight/test_daemons'
=== removed file 'testsuites/floodlight/test_daemons/tc_control'
--- testsuites/floodlight/test_daemons/tc_control 2012-11-15 13:12:37 +0000
+++ testsuites/floodlight/test_daemons/tc_control 1970-01-01 00:00:00 +0000
@@ -1,10 +0,0 @@
1description: Ensure that the correct floodlight and openvswitch daemons
2 are running and responding.
3command: python test.py
4action: |
5expected_results: |
6dependencies: n/a
7type: userland
8command: python test.py
9run_as: root
10timeout: 600
110
=== removed file 'testsuites/floodlight/test_daemons/test.py'
--- testsuites/floodlight/test_daemons/test.py 2013-03-01 17:39:50 +0000
+++ testsuites/floodlight/test_daemons/test.py 1970-01-01 00:00:00 +0000
@@ -1,59 +0,0 @@
1import logging
2import subprocess
3import unittest
4import urllib2
5
6logging.basicConfig(level=logging.INFO)
7
8
9class FloodlightDaemonTest(unittest.TestCase):
10 def testOpenvSwitchDaemons(self):
11 cmd = ["pgrep", "ovs-vswitchd"]
12 logging.debug("Cmd: %s" % (cmd))
13 output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
14 logging.debug("Cmd output: %s", output)
15 self.assertTrue(output.count('\n') >= 1,
16 "ovs-vswitchd not running or to many daemons"
17 " running: %s" % output)
18 cmd = ["pgrep", "ovsdb-server"]
19 logging.debug("Cmd: %s" % (cmd))
20 output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
21 logging.debug("Cmd output: %s", output)
22 self.assertTrue(output.count('\n') >= 1,
23 "ovsdb-server not running or to many daemons"
24 "running: %s" % output)
25
26 def testFloodlightDaemon(self):
27 cmd = ["service", "floodlight", "status"]
28 logging.debug("Cmd: %s" % (cmd))
29 output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
30 logging.debug("Cmd output: %s", output)
31 self.assertTrue("running" in output,
32 "Floodlight daemon is not running: %s" % output)
33
34 def testPorts(self):
35 cmd = ["netstat", "-an"]
36 logging.debug("Cmd: %s" % (cmd))
37 output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
38 logging.debug("Cmd output: %s", output)
39 self.assertTrue(":::6633" in output,
40 "Floodlight Openflow Controller Port not found (6633)")
41 self.assertTrue(":::8080" in output,
42 "Floodlight Web UI Port not found (8080)")
43 self.assertTrue(":::6655" in output,
44 "Floodlight Debug Port not found (6655)")
45
46 def testWebUI(self):
47 local_host_url = 'http://localhost:8080/ui/index.html'
48 try:
49 fh = urllib2.urlopen(local_host_url)
50 except urllib2.HTTPError, e:
51 logging.error("Failed to open localhost, '%s' error", e)
52 self.fail("Failed to connect to the localhost")
53 output = fh.read()
54 self.assertTrue('Big Switch Networks' in output,
55 output)
56
57
58if __name__ == '__main__':
59 unittest.main()
600
=== removed directory 'testsuites/floodlight/test_openflow'
=== removed file 'testsuites/floodlight/test_openflow/tc_control'
--- testsuites/floodlight/test_openflow/tc_control 2012-11-23 10:48:56 +0000
+++ testsuites/floodlight/test_openflow/tc_control 1970-01-01 00:00:00 +0000
@@ -1,12 +0,0 @@
1description: Setup a basic 14 host, two switch networking using the floodlight
2 openflow controller and then perform ping and performance tests between hosts.
3command: python test.py
4dependencies: n/a
5action: |
6 1. Execute ping between all hosts
7expected_results: |
8 1. No packet loss
9type: userland
10command: python test.py
11run_as: root
12timeout: 600
130
=== removed file 'testsuites/floodlight/test_openflow/test.py'
--- testsuites/floodlight/test_openflow/test.py 2013-03-01 17:39:50 +0000
+++ testsuites/floodlight/test_openflow/test.py 1970-01-01 00:00:00 +0000
@@ -1,61 +0,0 @@
1import unittest
2import logging
3from mininet.net import Mininet
4from mininet.node import RemoteController, OVSKernelSwitch
5
6Switch = OVSKernelSwitch
7Controller = RemoteController
8logging.basicConfig(level=logging.INFO)
9
10
11class BasicOpenflowTest(unittest.TestCase):
12 def addHost(self, N):
13 logging.debug("Creating host h%s and add to net.", N)
14 name = 'h%d' % N
15 ip = '10.0.0.%d' % N
16 return self.net.addHost(name, ip=ip)
17
18 def setUp(self):
19 self.net = Mininet(controller=Controller, switch=Switch)
20
21 logging.info("Creating controllers")
22 self.net.addController('c1', port=6633)
23
24 logging.info("Creating switches")
25 s1 = self.net.addSwitch('s1')
26 s2 = self.net.addSwitch('s2')
27
28 logging.info("Creating hosts (7 on each switch)")
29 hosts1 = [self.addHost(n) for n in 1, 2, 3, 4, 5, 6, 7]
30 hosts2 = [self.addHost(n) for n in 8, 9, 10, 11, 12, 13, 14]
31
32 logging.info("Creating links")
33 for h in hosts1:
34 s1.linkTo(h)
35 for h in hosts2:
36 s2.linkTo(h)
37 s1.linkTo(s2)
38
39 logging.info("Starting network")
40 self.net.start()
41
42 def testPingAll(self):
43 logging.info("Testing network")
44 packetLoss = self.net.pingAll()
45 self.assertTrue(packetLoss == 0,
46 "Packet loss during ping test %s" % packetLoss)
47
48 def testIPerfTCP(self):
49 logging.info("Running TCP performance test")
50 self.net.iperf()
51
52 def testIPerfUDP(self):
53 logging.info("Running UDP performance test")
54 self.net.iperf(l4Type='UDP')
55
56 def tearDown(self):
57 logging.info("Stopping network")
58 self.net.stop()
59
60if __name__ == '__main__':
61 unittest.main()
620
=== removed file 'testsuites/floodlight/ts_control'
--- testsuites/floodlight/ts_control 2012-09-21 09:09:54 +0000
+++ testsuites/floodlight/ts_control 1970-01-01 00:00:00 +0000
@@ -1,3 +0,0 @@
1timeout: 5000
2ts_setup: tsetup/setup.sh
3ts_cleanup: tcleanup/cleanup.sh
40
=== removed directory 'testsuites/floodlight/tsetup'
=== removed file 'testsuites/floodlight/tsetup/setup.sh'
--- testsuites/floodlight/tsetup/setup.sh 2012-11-30 09:37:46 +0000
+++ testsuites/floodlight/tsetup/setup.sh 1970-01-01 00:00:00 +0000
@@ -1,11 +0,0 @@
1#!/bin/bash
2
3set -ex
4
5HOSTNAME=`hostname`
6IPADDR=`hostname -i`
7
8apt-get update
9DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install floodlight mininet iperf
10
11sleep 10
120
=== removed file 'testsuites/floodlight/tslist.run'
--- testsuites/floodlight/tslist.run 2012-09-21 09:09:54 +0000
+++ testsuites/floodlight/tslist.run 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
1- test: test_daemons
2- test: test_openflow

Subscribers

People subscribed via source and target branches

to all changes: