Specs: extract add_kasmvnc_user_docker()

This commit is contained in:
Dmitry Maksyoma 2021-09-14 20:19:06 +12:00
parent 28c06893e3
commit dca392eafd

View File

@ -15,10 +15,14 @@ def run_cmd(cmd, **kwargs):
return completed_process
def add_kasmvnc_user_docker():
completed_process = run_cmd('echo -e "password\\npassword\\n" | vncpasswd -u docker')
expect(completed_process.returncode).to(equal(0))
with description('vncserver') as self:
with it('selects passed DE with -s'):
completed_process = run_cmd('echo -e "password\\npassword\\n" | vncpasswd -u docker')
expect(completed_process.returncode).to(equal(0))
add_kasmvnc_user_docker()
cmd = 'vncserver :1 -select-de mate -cert /etc/ssl/certs/ssl-cert-snakeoil.pem -key /etc/ssl/private/ssl-cert-snakeoil.key -sslOnly -FrameRate=24 -interface 0.0.0.0 -httpd /usr/share/kasmvnc/www -depth 24 -geometry 1280x1050'
try:
@ -31,8 +35,7 @@ with description('vncserver') as self:
run_cmd('vncserver -kill :1')
with it('asks to select a DE, when ran with -select-de'):
completed_process = run_cmd('echo -e "password\\npassword\\n" | vncpasswd -u docker')
expect(completed_process.returncode).to(equal(0))
add_kasmvnc_user_docker()
cmd = 'vncserver :1 -select-de -cert /etc/ssl/certs/ssl-cert-snakeoil.pem -key /etc/ssl/private/ssl-cert-snakeoil.key -sslOnly -FrameRate=24 -interface 0.0.0.0 -httpd /usr/share/kasmvnc/www -depth 24 -geometry 1280x1050'
try: