Commit 1248c083 authored by Xavier Thompson's avatar Xavier Thompson

Theia python3

See merge request nexedi/slapos!979
parents dd50c085 9796b1f4
Pipeline #15641 failed with stage
...@@ -296,6 +296,7 @@ tests = ...@@ -296,6 +296,7 @@ tests =
fluentd ${slapos.test.fluentd-setup:setup} fluentd ${slapos.test.fluentd-setup:setup}
kvm ${slapos.test.kvm-setup:setup} kvm ${slapos.test.kvm-setup:setup}
slaprunner ${slapos.test.slaprunner-setup:setup} slaprunner ${slapos.test.slaprunner-setup:setup}
theia ${slapos.test.theia-setup:setup}
metabase ${slapos.test.metabase-setup:setup} metabase ${slapos.test.metabase-setup:setup}
### ###
${:extra} ${:extra}
...@@ -314,7 +315,6 @@ extra = ...@@ -314,7 +315,6 @@ extra =
jstestnode ${slapos.test.jstestnode-setup:setup} jstestnode ${slapos.test.jstestnode-setup:setup}
nextcloud ${slapos.test.nextcloud-setup:setup} nextcloud ${slapos.test.nextcloud-setup:setup}
turnserver ${slapos.test.turnserver-setup:setup} turnserver ${slapos.test.turnserver-setup:setup}
theia ${slapos.test.theia-setup:setup}
grafana ${slapos.test.grafana-setup:setup} grafana ${slapos.test.grafana-setup:setup}
gitlab ${slapos.test.gitlab-setup:setup} gitlab ${slapos.test.gitlab-setup:setup}
cloudooo ${slapos.test.cloudooo-setup:setup} cloudooo ${slapos.test.cloudooo-setup:setup}
......
...@@ -14,29 +14,29 @@ ...@@ -14,29 +14,29 @@
# not need these here). # not need these here).
[instance-theia] [instance-theia]
filename = instance-theia.cfg.jinja.in _update_hash_filename_ = instance-theia.cfg.jinja.in
md5sum = 65c66a4cc4eb1d074dcafddf945a34d4 md5sum = 65c66a4cc4eb1d074dcafddf945a34d4
[instance] [instance]
filename = instance.cfg.in _update_hash_filename_ = instance.cfg.in
md5sum = 43923e3e1f27c43696ecbca9ee147bdb md5sum = 43923e3e1f27c43696ecbca9ee147bdb
[yarn.lock] [yarn.lock]
filename = yarn.lock _update_hash_filename_ = yarn.lock
md5sum = 80e7ad91deea54cebcccef5a83fdb380 md5sum = 80e7ad91deea54cebcccef5a83fdb380
[python-language-server-requirements.txt] [python-language-server-requirements.txt]
filename = python-language-server-requirements.txt _update_hash_filename_ = python-language-server-requirements.txt
md5sum = 9f478fd1b03b7738f3de549cb899bf54 md5sum = 9f478fd1b03b7738f3de549cb899bf54
[preloadTemplate.html] [preloadTemplate.html]
filename = preloadTemplate.html _update_hash_filename_ = preloadTemplate.html
md5sum = 8157c22134200bd862a07c6521ebf799 md5sum = 8157c22134200bd862a07c6521ebf799
[slapos.css.in] [slapos.css.in]
filename = slapos.css.in _update_hash_filename_ = slapos.css.in
md5sum = d2930ec3ef973b7908f0fa896033fd64 md5sum = d2930ec3ef973b7908f0fa896033fd64
[logo.png] [logo.png]
filename = logo.png _update_hash_filename_ = logo.png
md5sum = 97bd0f828ffbac2681af0f4bd72cba27 md5sum = 97bd0f828ffbac2681af0f4bd72cba27
[buildout]
extends =
software.cfg
[python]
part = python3
...@@ -149,9 +149,14 @@ eggs = ...@@ -149,9 +149,14 @@ eggs =
[template-base] [template-base]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:_update_hash_filename_}
output = ${buildout:parts-directory}/${:_buildout_section_name_} output = ${buildout:parts-directory}/${:_buildout_section_name_}
mode = 0644
[download-base]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:_update_hash_filename_}
destination = ${buildout:directory}/${:_buildout_section_name_}
output = ${:destination}
[python-language-server] [python-language-server]
version = 0.19.0 version = 0.19.0
...@@ -164,7 +169,7 @@ location = ${buildout:parts-directory}/${:_buildout_section_name_} ...@@ -164,7 +169,7 @@ location = ${buildout:parts-directory}/${:_buildout_section_name_}
stop-on-error = true stop-on-error = true
[python-language-server-requirements.txt] [python-language-server-requirements.txt]
<= template-base <= download-base
[theia] [theia]
recipe = plone.recipe.command recipe = plone.recipe.command
...@@ -194,16 +199,16 @@ install = ...@@ -194,16 +199,16 @@ install =
os.chmod(destination_dir, 0o750) os.chmod(destination_dir, 0o750)
[yarn.lock] [yarn.lock]
<= template-base <= download-base
[preloadTemplate.html] [preloadTemplate.html]
<= template-base <= download-base
[slapos.css.in] [slapos.css.in]
<= template-base <= download-base
[logo.png] [logo.png]
<= template-base <= download-base
[package.json] [package.json]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
...@@ -293,7 +298,6 @@ template = ...@@ -293,7 +298,6 @@ template =
} }
} }
rendered = ${buildout:directory}/${:_buildout_section_name_} rendered = ${buildout:directory}/${:_buildout_section_name_}
mode = 0644
[gowork] [gowork]
...@@ -308,7 +312,6 @@ PATH = ${nodejs:location}/bin:${bash:location}/bin:${fish-shell:location}/bin:${ ...@@ -308,7 +312,6 @@ PATH = ${nodejs:location}/bin:${bash:location}/bin:${fish-shell:location}/bin:${
[theia-wrapper] [theia-wrapper]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${buildout:bin-directory}/${:_buildout_section_name_} rendered = ${buildout:bin-directory}/${:_buildout_section_name_}
mode = 0755
template = template =
inline: inline:
#!/bin/sh #!/bin/sh
...@@ -318,7 +321,6 @@ template = ...@@ -318,7 +321,6 @@ template =
[theia-open] [theia-open]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${buildout:bin-directory}/${:_buildout_section_name_} rendered = ${buildout:bin-directory}/${:_buildout_section_name_}
mode = 0755
template = template =
inline: inline:
#!/bin/sh #!/bin/sh
......
...@@ -40,15 +40,17 @@ import pexpect ...@@ -40,15 +40,17 @@ import pexpect
import psutil import psutil
import requests import requests
import sqlite3 import sqlite3
import six
from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass
from slapos.grid.svcbackend import getSupervisorRPC from slapos.grid.svcbackend import getSupervisorRPC
from slapos.grid.svcbackend import _getSupervisordSocketPath from slapos.grid.svcbackend import _getSupervisordSocketPath
software_cfg = 'software%s.cfg' % ('-py3' if six.PY3 else '')
setUpModule, SlapOSInstanceTestCase = makeModuleSetUpAndTestCaseClass( setUpModule, SlapOSInstanceTestCase = makeModuleSetUpAndTestCaseClass(
os.path.abspath( os.path.abspath(
os.path.join(os.path.dirname(__file__), '..', 'software.cfg'))) os.path.join(os.path.dirname(__file__), '..', software_cfg)))
class TheiaTestCase(SlapOSInstanceTestCase): class TheiaTestCase(SlapOSInstanceTestCase):
...@@ -190,9 +192,9 @@ class TestTheia(TheiaTestCase): ...@@ -190,9 +192,9 @@ class TestTheia(TheiaTestCase):
def test_slapos_cli(self): def test_slapos_cli(self):
slapos = self._getSlapos() slapos = self._getSlapos()
proxy_show_output = subprocess.check_output((slapos, 'proxy', 'show')) proxy_show_output = subprocess.check_output((slapos, 'proxy', 'show'))
self.assertIn('slaprunner', proxy_show_output) self.assertIn(b'slaprunner', proxy_show_output)
computer_list_output = subprocess.check_output((slapos, 'computer', 'list')) computer_list_output = subprocess.check_output((slapos, 'computer', 'list'))
self.assertIn('slaprunner', computer_list_output) self.assertIn(b'slaprunner', computer_list_output)
class TestTheiaEmbeddedSlapOSShutdown(TheiaTestCase): class TestTheiaEmbeddedSlapOSShutdown(TheiaTestCase):
...@@ -240,7 +242,7 @@ class TestTheiaWithSR(TheiaTestCase): ...@@ -240,7 +242,7 @@ class TestTheiaWithSR(TheiaTestCase):
def test(self): def test(self):
slapos = self._getSlapos() slapos = self._getSlapos()
info = subprocess.check_output((slapos, 'proxy', 'show')) info = subprocess.check_output((slapos, 'proxy', 'show'), universal_newlines=True)
instance_name = "Embedded Instance" instance_name = "Embedded Instance"
self.assertIsNotNone(re.search(r"%s\s+slaprunner\s+available" % (self.sr_url,), info), info) self.assertIsNotNone(re.search(r"%s\s+slaprunner\s+available" % (self.sr_url,), info), info)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment