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

Theia python3

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