aboutsummaryrefslogtreecommitdiff
path: root/lava_scheduler_app/tests/test_pipeline.py
diff options
context:
space:
mode:
authorNeil Williams <neil.williams@linaro.org>2016-09-02 15:00:59 +0100
committerNeil Williams <neil.williams@linaro.org>2016-09-05 15:43:20 +0000
commit80319b724a15820043e076ebc824ba1f5148112a (patch)
tree43bb53e5ea644375d72b2db312dde41285dcb567 /lava_scheduler_app/tests/test_pipeline.py
parent4fd7ec6627519a96996fb476dd2efd47788d2490 (diff)
Add support for LXC with multinode
Closes: #2500 - handle the lava-lxc protocol in a similar manner to lava-vland when used alongside lava-multinode, except that the LXC protocol needs to specify the role for the supplied parameters. Change-Id: I5875bab36d86c14aafa740dd36ecfe5523bf7354
Diffstat (limited to 'lava_scheduler_app/tests/test_pipeline.py')
-rw-r--r--lava_scheduler_app/tests/test_pipeline.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/lava_scheduler_app/tests/test_pipeline.py b/lava_scheduler_app/tests/test_pipeline.py
index 7e9cc0664..243729eaf 100644
--- a/lava_scheduler_app/tests/test_pipeline.py
+++ b/lava_scheduler_app/tests/test_pipeline.py
@@ -698,6 +698,27 @@ class TestYamlMultinode(TestCaseWithFactory):
else:
self.fail('unexpected role')
+ def test_multinode_lxc(self):
+ submission = yaml.load(open(
+ os.path.join(os.path.dirname(__file__), 'lxc-multinode.yaml'), 'r'))
+ target_group = 'arbitrary-group-id' # for unit tests only
+
+ jobs = split_multinode_yaml(submission, target_group)
+ protocol_data = {
+ 'lava-lxc': {
+ 'name': 'pipeline-lxc-test', 'template': 'debian',
+ 'security_mirror': 'http://mirror.csclub.uwaterloo.ca/debian-security/', 'release': 'sid',
+ 'distribution': 'debian', 'mirror': 'http://ftp.us.debian.org/debian/', 'arch': 'amd64'}
+ }
+ for role, _ in jobs.iteritems():
+ if role == 'server':
+ self.assertNotIn('lava-lxc', jobs[role][0]['protocols'])
+ elif role == 'client':
+ self.assertIn('lava-lxc', jobs[role][0]['protocols'])
+ self.assertEqual(jobs[role][0]['protocols']['lava-lxc'], protocol_data['lava-lxc'])
+ else:
+ self.fail('Unrecognised role: %s' % role)
+
def test_multinode_protocols(self):
user = self.factory.make_user()
device_type = self.factory.make_device_type()