summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCole Robinson <crobinso@redhat.com>2018-01-21 12:40:15 -0500
committerCole Robinson <crobinso@redhat.com>2018-01-21 14:42:44 -0500
commita10fda6b5c74c781e269073816b913d03a23ca87 (patch)
treec2535e70ede4e4d943659ce49c8e2b674c6bdadc /tests
parentd774d01e1ce3d0db91cb78425de4015c622bc99d (diff)
downloadvirt-manager-a10fda6b5c74c781e269073816b913d03a23ca87.tar.gz
uitests: console: Add live lxc serial test
Diffstat (limited to 'tests')
-rw-r--r--tests/uitests/console.py10
-rw-r--r--tests/uitests/xml/uitests-lxc-serial.xml14
2 files changed, 24 insertions, 0 deletions
diff --git a/tests/uitests/console.py b/tests/uitests/console.py
index 83cb5d26..7b2dfe77 100644
--- a/tests/uitests/console.py
+++ b/tests/uitests/console.py
@@ -123,3 +123,13 @@ class Console(uiutils.UITestCase):
return self._checkPassword()
+ @_vm_wrapper("uitests-lxc-serial", uri="lxc:///")
+ def testConsoleLXCSerial(self):
+ """
+ Ensure LXC has serial open, and we can send some data
+ """
+ win = self.app.topwin
+ term = win.find("Serial Terminal")
+ self.assertTrue(term.showing)
+ term.typeText("help\n")
+ self.assertTrue("COMMANDS" in term.text)
diff --git a/tests/uitests/xml/uitests-lxc-serial.xml b/tests/uitests/xml/uitests-lxc-serial.xml
new file mode 100644
index 00000000..1ed357f2
--- /dev/null
+++ b/tests/uitests/xml/uitests-lxc-serial.xml
@@ -0,0 +1,14 @@
+<domain type='lxc'>
+ <name>uitests-lxc-serial</name>
+ <memory unit='KiB'>1048576</memory>
+ <currentMemory unit='KiB'>1048576</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='x86_64'>exe</type>
+ <init>/bin/sh</init>
+ </os>
+ <devices>
+ <console type='pty'/>
+ </devices>
+</domain>
+