Message ID | 20211221133759.6579-1-vsementsov@virtuozzo.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | qapi/ui: add change-vnc-listen | expand |
On Tue, Dec 21, 2021 at 5:38 PM Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> wrote: > > Add simple test-case for new change-vnc-listen qmp command. > > Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> thanks > --- > tests/avocado/vnc.py | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/tests/avocado/vnc.py b/tests/avocado/vnc.py > index 096432988f..f05ee1e00a 100644 > --- a/tests/avocado/vnc.py > +++ b/tests/avocado/vnc.py > @@ -51,3 +51,13 @@ def test_change_password(self): > set_password_response = self.vm.qmp('change-vnc-password', > password='new_password') > self.assertEqual(set_password_response['return'], {}) > + > + def test_change_listen(self): > + self.vm.add_args('-nodefaults', '-S', '-vnc', ':0') > + self.vm.launch() > + self.assertEqual(self.vm.qmp('query-vnc')['return']['service'], '5900') > + res = self.vm.qmp('change-vnc-listen', id='default', > + addresses=[{'type': 'inet', 'host': '0.0.0.0', > + 'port': '5901'}]) > + self.assertEqual(res['return'], {}) > + self.assertEqual(self.vm.qmp('query-vnc')['return']['service'], '5901') > -- > 2.31.1 >
diff --git a/tests/avocado/vnc.py b/tests/avocado/vnc.py index 096432988f..f05ee1e00a 100644 --- a/tests/avocado/vnc.py +++ b/tests/avocado/vnc.py @@ -51,3 +51,13 @@ def test_change_password(self): set_password_response = self.vm.qmp('change-vnc-password', password='new_password') self.assertEqual(set_password_response['return'], {}) + + def test_change_listen(self): + self.vm.add_args('-nodefaults', '-S', '-vnc', ':0') + self.vm.launch() + self.assertEqual(self.vm.qmp('query-vnc')['return']['service'], '5900') + res = self.vm.qmp('change-vnc-listen', id='default', + addresses=[{'type': 'inet', 'host': '0.0.0.0', + 'port': '5901'}]) + self.assertEqual(res['return'], {}) + self.assertEqual(self.vm.qmp('query-vnc')['return']['service'], '5901')
Add simple test-case for new change-vnc-listen qmp command. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> --- tests/avocado/vnc.py | 10 ++++++++++ 1 file changed, 10 insertions(+)