From fe2bd6c6d6a93604401db217e8296052c482a61b Mon Sep 17 00:00:00 2001 From: Dmitry Maksyoma Date: Wed, 15 Sep 2021 18:16:27 +1200 Subject: [PATCH] Specs: extract select_de() --- spec/vncserver_spec.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spec/vncserver_spec.py b/spec/vncserver_spec.py index 58869de..2c0d0bc 100644 --- a/spec/vncserver_spec.py +++ b/spec/vncserver_spec.py @@ -37,6 +37,15 @@ def kill_xvnc(): run_cmd('vncserver -kill :1') +def select_de(de_name): + try: + cmd = f'{vncserver_cmd} -select-de {de_name}' + completed_process = run_cmd(cmd) + expect(completed_process.returncode).to(equal(0)) + finally: + kill_xvnc() + + def check_de_was_setup_to_run(de_name): completed_process = run_cmd(f'grep -q {de_name} ~/.vnc/xstartup') expect(completed_process.returncode).to(equal(0))