Commit 2e3478d4 authored by Kirill Smelkov's avatar Kirill Smelkov

Merge remote-tracking branch 'origin/master' into t

parents a2ed6213 de470a23
...@@ -64,6 +64,16 @@ environment = ...@@ -64,6 +64,16 @@ environment =
url = https://github.com/dejavu-fonts/dejavu-fonts/releases/download/version_2_37/dejavu-fonts-ttf-2.37.tar.bz2 url = https://github.com/dejavu-fonts/dejavu-fonts/releases/download/version_2_37/dejavu-fonts-ttf-2.37.tar.bz2
md5sum = d0efec10b9f110a32e9b8f796e21782c md5sum = d0efec10b9f110a32e9b8f796e21782c
[source-code-pro-fonts]
<= fonts-base
url = https://codeload.github.com/adobe-fonts/source-code-pro/zip/235b72fc43a46cacf36e7c9b45d8d4fc0d121099
md5sum = b25e165c3fb984bbf6d847adfbd9d694
[jetbrains-mono-fonts]
<= fonts-base
url = https://download.jetbrains.com/fonts/JetBrainsMono-2.001.zip
md5sum = 62f02985bfef43a27dbdd17641fec210
# Microsoft's TrueType core fonts # Microsoft's TrueType core fonts
# non-free so not enabled by default # non-free so not enabled by default
[msttcore-fonts] [msttcore-fonts]
......
...@@ -42,13 +42,11 @@ post-install = ...@@ -42,13 +42,11 @@ post-install =
done done
cat <<EOF >ld cat <<EOF >ld
#!/bin/sh -e #!/bin/sh -e
case \$#:\$1 in 0:|1:-*) ;; *) for x; do case \$x in -rpath|-rpath=*)
if [ "\$LD_RUN_PATH" ] set -- "\$@" $2
then LD_RUN_PATH=\$LD_RUN_PATH$1 ! break
else set -- "\$@" $2
fi
;; ;;
esac esac; done && export LD_RUN_PATH=\$${LD_RUN_PATH:+\$LD_RUN_PATH:}$${1#:}
exec ${binutils:location}/bin/ld "\$@" exec ${binutils:location}/bin/ld "\$@"
EOF EOF
chmod +x ld chmod +x ld
......
...@@ -3,8 +3,8 @@ parts = pure-ftpd ...@@ -3,8 +3,8 @@ parts = pure-ftpd
[pure-ftpd] [pure-ftpd]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
url = https://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.46.tar.bz2 url = https://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.49.tar.bz2
md5sum = efce5529c1f0a39dafdd532c619503f1 md5sum = b7025f469711d88bd84a3518f67c1470
# See https://download.pureftpd.org/pub/pure-ftpd/doc/README for more configurations # See https://download.pureftpd.org/pub/pure-ftpd/doc/README for more configurations
# We need the trick about UPLOAD_PIPE_FILE and UPLOAD_PIPE_LOCK so that the files are created inside the $CWD/var/run # We need the trick about UPLOAD_PIPE_FILE and UPLOAD_PIPE_LOCK so that the files are created inside the $CWD/var/run
......
[buildout]
extends =
../xz-utils/buildout.cfg
parts = quickjs
[quickjs]
recipe = slapos.recipe.cmmi
configure-command = true
url = https://bellard.org/quickjs/quickjs-2020-09-06.tar.xz
md5sum = 47cb6def3263d6a631b647b268b1c554
environment =
PATH=${xz-utils:location}/bin:%(PATH)s
This diff is collapsed.
...@@ -6764,6 +6764,16 @@ class TestPassedRequestParameter(HttpFrontendTestCase): ...@@ -6764,6 +6764,16 @@ class TestPassedRequestParameter(HttpFrontendTestCase):
cls.slap.supply(cls.frontend_3_sr, cls.slap._computer_id) cls.slap.supply(cls.frontend_3_sr, cls.slap._computer_id)
cls.slap.supply(cls.kedifa_sr, cls.slap._computer_id) cls.slap.supply(cls.kedifa_sr, cls.slap._computer_id)
@classmethod
def tearDownClass(cls):
cls.slap.supply(
cls.frontend_2_sr, cls.slap._computer_id, state="destroyed")
cls.slap.supply(
cls.frontend_3_sr, cls.slap._computer_id, state="destroyed")
cls.slap.supply(
cls.kedifa_sr, cls.slap._computer_id, state="destroyed")
super(TestPassedRequestParameter, cls).tearDownClass()
instance_parameter_dict = { instance_parameter_dict = {
'port': HTTPS_PORT, 'port': HTTPS_PORT,
'plain_http_port': HTTP_PORT, 'plain_http_port': HTTP_PORT,
......
...@@ -15,4 +15,4 @@ ...@@ -15,4 +15,4 @@
[instance-profile] [instance-profile]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = c352c6f11b7a00dca0a544f7ecddeb52 md5sum = 134ed1cf1f6de63b14425031eb5c9043
...@@ -32,12 +32,9 @@ plugin = ${:etc}/plugin ...@@ -32,12 +32,9 @@ plugin = ${:etc}/plugin
pureftpd-dir = ${:srv}/pureftpd/ pureftpd-dir = ${:srv}/pureftpd/
[check-port-listening-promise] [check-port-listening-promise]
recipe = slapos.cookbook:promise.plugin <= monitor-promise-base
eggs = module = check_port_listening
slapos.toolbox name = check_nginx_port.py
output = ${directory:plugin}/${:_buildout_section_name_}
content =
from slapos.promise.plugin.check_port_listening import RunPromise
[pureftpd-listen-promise] [pureftpd-listen-promise]
<= check-port-listening-promise <= check-port-listening-promise
......
...@@ -9,13 +9,16 @@ extends = ...@@ -9,13 +9,16 @@ extends =
parts = parts =
slapos-cookbook slapos-cookbook
instance-profile instance-profile
[python]
part = python3
# force to install plone.recipe.command and slapos.toolbox as it will be used during instanciation # force to install plone.recipe.command as it will be used during instanciation
[slapos-cookbook] [slapos-cookbook]
eggs += eggs +=
plone.recipe.command plone.recipe.command
slapos.toolbox
[instance-profile] [instance-profile]
......
...@@ -18,7 +18,7 @@ md5sum = 8d6878ff1d2e75010c50a1a2b0c13b24 ...@@ -18,7 +18,7 @@ md5sum = 8d6878ff1d2e75010c50a1a2b0c13b24
[template-runner] [template-runner]
filename = instance-runner.cfg filename = instance-runner.cfg
md5sum = 376ae851bb13bd88b02ecd72249a64bd md5sum = 6e279c46b07bf56b7b037a8ee2c6587e
[template-runner-import-script] [template-runner-import-script]
filename = template/runner-import.sh.jinja2 filename = template/runner-import.sh.jinja2
......
...@@ -20,6 +20,7 @@ common-runner-parts = ...@@ -20,6 +20,7 @@ common-runner-parts =
runtestsuite runtestsuite
shellinabox shellinabox
shellinabox-service shellinabox-service
template-slapuser-script
slapos-cfg slapos-cfg
slapformat-definition.cfg slapformat-definition.cfg
cron-entry-prepare-software cron-entry-prepare-software
...@@ -30,6 +31,8 @@ common-runner-parts = ...@@ -30,6 +31,8 @@ common-runner-parts =
bash-profile bash-profile
supervisord-wrapper supervisord-wrapper
supervisord-promise supervisord-promise
slapos-supervisord-promise
slapos-proxy-promise
logrotate-entry-supervisord logrotate-entry-supervisord
logrotate-entry-slapgrid logrotate-entry-slapgrid
httpd-graceful-wrapper httpd-graceful-wrapper
...@@ -213,8 +216,7 @@ default_repository_branch = $${slap-parameter:slapos-reference} ...@@ -213,8 +216,7 @@ default_repository_branch = $${slap-parameter:slapos-reference}
#-- supervisord managing slaprunner instance processes #-- supervisord managing slaprunner instance processes
[slaprunner-supervisord-wrapper] [slaprunner-supervisord-wrapper]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
# XXX hardcoded locations command-line = ${buildout:bin-directory}/slapos node supervisord --cfg=$${slaprunner:slapos.cfg} --nodaemon
command-line = $${template-slapuser-script:rendered} node supervisord -n
wrapper-path = $${directory:services}/slaprunner-supervisord wrapper-path = $${directory:services}/slaprunner-supervisord
hash-existing-files = $${buildout:directory}/software_release/buildout.cfg hash-existing-files = $${buildout:directory}/software_release/buildout.cfg
...@@ -648,7 +650,13 @@ monitor-interface-url = ...@@ -648,7 +650,13 @@ monitor-interface-url =
monitor-httpd-port = 8386 monitor-httpd-port = 8386
buildout-shared-folder = $${runnerdirectory:home}/shared buildout-shared-folder = $${runnerdirectory:home}/shared
{% for k, v in slapparameter_dict.items() -%} {% for k, v in slapparameter_dict.items() -%}
{% if k == 'user-authorized-key' and v -%}
{% set key_list = v.split('\n') -%}
{{ k }} =
{{ key_list | join('\n ') }}
{% else -%}
{{ k }} = {{ v }} {{ k }} = {{ v }}
{% endif -%}
{% endfor -%} {% endfor -%}
[slapos-cfg] [slapos-cfg]
...@@ -858,6 +866,19 @@ name = supervisord.py ...@@ -858,6 +866,19 @@ name = supervisord.py
config-hostname = $${slaprunner:ipv4} config-hostname = $${slaprunner:ipv4}
config-port = $${supervisord:port} config-port = $${supervisord:port}
[slapos-supervisord-promise]
<= monitor-promise-base
module = check_command_execute
name = instance_supervisord.py
config-command = ${buildout:bin-directory}/slapos node supervisorctl --cfg=$${slaprunner:slapos.cfg} pid
[slapos-proxy-promise]
<= monitor-promise-base
module = check_port_listening
name = slaproxy.py
config-hostname = $${slaprunner:ipv4}
config-port = $${slaprunner:proxy_port}
# XXX Monitor # XXX Monitor
[monitor-instance-parameter] [monitor-instance-parameter]
monitor-httpd-port = $${slap-parameter:monitor-httpd-port} monitor-httpd-port = $${slap-parameter:monitor-httpd-port}
......
...@@ -321,9 +321,11 @@ class TestWeb(SlaprunnerTestCase): ...@@ -321,9 +321,11 @@ class TestWeb(SlaprunnerTestCase):
class TestSSH(SlaprunnerTestCase): class TestSSH(SlaprunnerTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
cls.ssh_key = paramiko.RSAKey.generate(1024) cls.ssh_key_list = [paramiko.RSAKey.generate(1024) for i in range(2)]
return { return {
'user-authorized-key': 'ssh-rsa {}'.format(cls.ssh_key.get_base64()) 'user-authorized-key': 'ssh-rsa {}\nssh-rsa {}'.format(
*[key.get_base64() for key in cls.ssh_key_list]
)
} }
def test_connect(self): def test_connect(self):
...@@ -355,43 +357,44 @@ class TestSSH(SlaprunnerTestCase): ...@@ -355,43 +357,44 @@ class TestSSH(SlaprunnerTestCase):
key_policy = KeyPolicy() key_policy = KeyPolicy()
client.set_missing_host_key_policy(key_policy) client.set_missing_host_key_policy(key_policy)
with contextlib.closing(client): for ssh_key in self.ssh_key_list:
client.connect( with contextlib.closing(client):
username=username, client.connect(
hostname=parsed.hostname, username=username,
port=parsed.port, hostname=parsed.hostname,
pkey=self.ssh_key, port=parsed.port,
) pkey=ssh_key,
# Check fingerprint from server matches the published one. )
# Paramiko does not allow to get the fingerprint as SHA256 easily yet # Check fingerprint from server matches the published one.
# https://github.com/paramiko/paramiko/pull/1103 # Paramiko does not allow to get the fingerprint as SHA256 easily yet
self.assertEqual( # https://github.com/paramiko/paramiko/pull/1103
fingerprint_from_url, self.assertEqual(
quote( fingerprint_from_url,
# base64 encoded fingerprint adds an extra = at the end quote(
base64.b64encode( # base64 encoded fingerprint adds an extra = at the end
hashlib.sha256(key_policy.key.asbytes()).digest())[:-1], base64.b64encode(
# also encode / hashlib.sha256(key_policy.key.asbytes()).digest())[:-1],
safe='')) # also encode /
safe=''))
# Check shell is usable
channel = client.invoke_shell() # Check shell is usable
channel.settimeout(30) channel = client.invoke_shell()
received = '' channel.settimeout(30)
while True: received = ''
r = bytes2str(channel.recv(1024)) while True:
self.logger.debug("received >%s<", r) r = bytes2str(channel.recv(1024))
if not r: self.logger.debug("received >%s<", r)
break if not r:
received += r break
if 'slaprunner shell' in received: received += r
break if 'slaprunner shell' in received:
self.assertIn("Welcome to SlapOS slaprunner shell", received) break
self.assertIn("Welcome to SlapOS slaprunner shell", received)
# simple commands can also be executed ( this would be like `ssh bash -c 'pwd'` )
self.assertEqual( # simple commands can also be executed ( this would be like `ssh bash -c 'pwd'` )
self.computer_partition_root_path, self.assertEqual(
bytes2str(client.exec_command("pwd")[1].read(1000)).strip()) self.computer_partition_root_path,
bytes2str(client.exec_command("pwd")[1].read(1000)).strip())
class TestSlapOS(SlaprunnerTestCase): class TestSlapOS(SlaprunnerTestCase):
......
...@@ -15,12 +15,24 @@ ...@@ -15,12 +15,24 @@
[instance] [instance]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = f95354d4af4a78ad7fd11ebc9281ed19 md5sum = 397fcb3279029af3055b23525d147445
[yarn.lock] [yarn.lock]
filename = yarn.lock filename = yarn.lock
md5sum = 07835b4acfbd8f4a96ac15ffecd238b0 md5sum = d058e73c3d90ac3da44734c2d47eac95
[python-language-server-requirements.txt] [python-language-server-requirements.txt]
filename = python-language-server-requirements.txt filename = python-language-server-requirements.txt
md5sum = d2ce161244ce9ebce5295302a1b2a7df md5sum = 0883a40ebcb33d8d7c520490b21bd16c
[preloadTemplate.html]
filename = preloadTemplate.html
md5sum = 8157c22134200bd862a07c6521ebf799
[slapos.css.in]
filename = slapos.css.in
md5sum = d2930ec3ef973b7908f0fa896033fd64
[logo.png]
filename = logo.png
md5sum = 97bd0f828ffbac2681af0f4bd72cba27
...@@ -54,7 +54,7 @@ template = inline: ...@@ -54,7 +54,7 @@ template = inline:
root $${directory:frontend-static} root $${directory:frontend-static}
browse browse
proxy / $${theia-instance:base-url} { proxy / $${theia-instance:base-url} {
except public $${favicon.ico:filename} except $${frontend-instance-fonts:folder-name} $${frontend-instance-slapos.css:folder-name} public $${favicon.ico:filename} $${frontend-instance-logo:filename}
} }
proxy /services $${theia-instance:base-url} { proxy /services $${theia-instance:base-url} {
websocket websocket
...@@ -83,6 +83,33 @@ port = $${frontend-instance-config:port} ...@@ -83,6 +83,33 @@ port = $${frontend-instance-config:port}
pidfile = $${directory:pidfiles}/$${:_buildout_section_name_}.pid pidfile = $${directory:pidfiles}/$${:_buildout_section_name_}.pid
url = https://$${:hostname}:$${:port}/ url = https://$${:hostname}:$${:port}/
[frontend-instance-fonts]
; XXX caddy 1 does not seem to serve different folders at different locations
; so we link fonts in static folder
recipe = plone.recipe.command
location = $${directory:frontend-static}/$${:folder-name}
folder-name = fonts
command =
mkdir $${:location}
ln -s ${source-code-pro-fonts:location} $${:location}/source-code-pro
ln -s ${jetbrains-mono-fonts:location} $${:location}/jetbrains-mono
stop-on-error = true
[frontend-instance-logo]
recipe = plone.recipe.command
filename = logo.png
command =
ln -s ${logo.png:output} $${directory:frontend-static}/$${:filename}
stop-on-error = true
[frontend-instance-slapos.css]
recipe = slapos.recipe.template:jinja2
template = ${slapos.css.in:output}
rendered = $${directory:frontend-static}/$${:folder-name}/slapos.css
folder-name = css
context =
key logo_image frontend-instance-logo:filename
[frontend-reload] [frontend-reload]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:services}/$${:_buildout_section_name_} wrapper-path = $${directory:services}/$${:_buildout_section_name_}
...@@ -220,11 +247,14 @@ rendered = $${directory:bin}/$${:_buildout_section_name_} ...@@ -220,11 +247,14 @@ rendered = $${directory:bin}/$${:_buildout_section_name_}
mode = 0700 mode = 0700
template = inline: template = inline:
#!${python:location}/bin/python #!${python:location}/bin/python
import sys
import os import os
import sys
import time
args = sys.argv[1:] args = sys.argv[1:]
# when running interactively, activate slapos configuration and reset GIT_EXEC_PATH to workaround https://github.com/eclipse-theia/theia/issues/7555 # when running interactively, activate slapos configuration and reset GIT_EXEC_PATH to workaround https://github.com/eclipse-theia/theia/issues/7555
if not args: args = ["-c", ". $${slapos-standalone-activate:rendered} && exec env GIT_EXEC_PATH= ${bash:location}/bin/bash", ] if not args: args = ["-c", ". $${slapos-standalone-activate:rendered} && exec env GIT_EXEC_PATH= ${bash:location}/bin/bash", ]
# otherwise, assume this shell is running task and add an artificial delay to workaround https://github.com/eclipse-theia/theia/issues/2961
else: time.sleep(1)
os.execv('${bash:location}/bin/bash', ['${bash:location}/bin/bash'] + args) os.execv('${bash:location}/bin/bash', ['${bash:location}/bin/bash'] + args)
[slapos-standalone-activate] [slapos-standalone-activate]
...@@ -323,3 +353,4 @@ project = $${:srv}/project ...@@ -323,3 +353,4 @@ project = $${:srv}/project
slapos = $${:srv}/slapos slapos = $${:srv}/slapos
frontend-static = $${:srv}/frontend-static frontend-static = $${:srv}/frontend-static
frontend-static-public = $${:frontend-static}/public frontend-static-public = $${:frontend-static}/public
frontend-static-css = $${:frontend-static}/css
<script>
let link = document.createElement('link');
link.rel = "stylesheet";
link.href = "/css/slapos.css";
document.head.appendChild(link);
</script>
\ No newline at end of file
...@@ -14,7 +14,7 @@ parso==0.3.2 ...@@ -14,7 +14,7 @@ parso==0.3.2
pluggy==0.8.1 pluggy==0.8.1
pydocstyle==3.0.0 pydocstyle==3.0.0
pyflakes==2.1.0 pyflakes==2.1.0
pygls==0.8.1 pygls==0.9.1
pylint==2.4.4 pylint==2.4.4
python-jsonrpc-server==0.1.2 python-jsonrpc-server==0.1.2
-e git+https://github.com/palantir/python-language-server@50d03d5931d564e9908292ccfa21dd629ee817ba#egg=python_language_server -e git+https://github.com/palantir/python-language-server@50d03d5931d564e9908292ccfa21dd629ee817ba#egg=python_language_server
...@@ -26,5 +26,5 @@ typed-ast==1.4.1 ...@@ -26,5 +26,5 @@ typed-ast==1.4.1
typing-extensions==3.7.4.2 typing-extensions==3.7.4.2
wrapt==1.11.2 wrapt==1.11.2
yapf==0.29.0 yapf==0.29.0
zc.buildout.languageserver==0.2.1 zc.buildout.languageserver==0.4.0
theia-open==0.1.2 theia-open==0.3.0
This diff is collapsed.
...@@ -11,6 +11,7 @@ extends = ...@@ -11,6 +11,7 @@ extends =
../../component/curl/buildout.cfg ../../component/curl/buildout.cfg
../../component/coreutils/buildout.cfg ../../component/coreutils/buildout.cfg
../../component/java-jdk/buildout.cfg ../../component/java-jdk/buildout.cfg
../../component/fonts/buildout.cfg
../../stack/slapos.cfg ../../stack/slapos.cfg
../../stack/monitor/buildout.cfg ../../stack/monitor/buildout.cfg
../../component/defaults.cfg ../../component/defaults.cfg
...@@ -116,6 +117,12 @@ eggs = ...@@ -116,6 +117,12 @@ eggs =
supervisor supervisor
setuptools setuptools
[template-base]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:parts-directory}/${:_buildout_section_name_}
mode = 0644
[python-language-server] [python-language-server]
version = 0.19.0 version = 0.19.0
recipe = plone.recipe.command recipe = plone.recipe.command
...@@ -127,11 +134,7 @@ location = ${buildout:parts-directory}/${:_buildout_section_name_} ...@@ -127,11 +134,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]
recipe = slapos.recipe.template <= template-base
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:parts-directory}/${:_buildout_section_name_}
mode = 0644
[theia] [theia]
recipe = plone.recipe.command recipe = plone.recipe.command
...@@ -152,10 +155,16 @@ uses = ${yarn.lock:recipe} ...@@ -152,10 +155,16 @@ uses = ${yarn.lock:recipe}
THEIA_DEFAULT_PLUGINS = ${:location}/plugins/ THEIA_DEFAULT_PLUGINS = ${:location}/plugins/
[yarn.lock] [yarn.lock]
recipe = slapos.recipe.template <= template-base
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:parts-directory}/${:_buildout_section_name_} [preloadTemplate.html]
mode = 0644 <= template-base
[slapos.css.in]
<= template-base
[logo.png]
<= template-base
[package.json] [package.json]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
...@@ -193,6 +202,11 @@ template = ...@@ -193,6 +202,11 @@ template =
"java.home": "${java-jdk:location}" "java.home": "${java-jdk:location}"
} }
} }
},
"generator": {
"config": {
"preloadTemplate": "${preloadTemplate.html:output}"
}
} }
}, },
"dependencies": { "dependencies": {
...@@ -309,8 +323,11 @@ template = ...@@ -309,8 +323,11 @@ template =
"vscode-java-test": "https://github.com/microsoft/vscode-java-test/releases/download/0.22.0/vscjava.vscode-java-test-0.22.0.vsix", "vscode-java-test": "https://github.com/microsoft/vscode-java-test/releases/download/0.22.0/vscjava.vscode-java-test-0.22.0.vsix",
"vscode-python": "https://github.com/microsoft/vscode-python/releases/download/2020.1.58038/ms-python-release.vsix", "vscode-python": "https://github.com/microsoft/vscode-python/releases/download/2020.1.58038/ms-python-release.vsix",
"vscode-ruby": "https://github.com/rubyide/vscode-ruby/releases/download/v0.25.0/ruby-0.25.0.vsix", "vscode-ruby": "https://github.com/rubyide/vscode-ruby/releases/download/v0.25.0/ruby-0.25.0.vsix",
"vscode-zc-buildout": "https://github.com/perrinjerome/vscode-zc-buildout/releases/download/v0.2.0/vscode-zc-buildout-0.2.0.vsix", "vscode-zc-buildout": "https://github.com/perrinjerome/vscode-zc-buildout/releases/download/v0.4.0/vscode-zc-buildout-0.4.0.vsix",
"plantuml": "https://open-vsx.org/api/jebbs/plantuml/2.13.12/file/jebbs.plantuml-2.13.12.vsix" "plantuml": "https://open-vsx.org/api/jebbs/plantuml/2.13.12/file/jebbs.plantuml-2.13.12.vsix",
"diff": "https://open-vsx.org/api/rafaelmaiolla/diff/0.0.1/file/rafaelmaiolla.diff-0.0.1.vsix",
"git-commit-syntax": "https://github.com/perrinjerome/git-commit-syntax/releases/download/v0.0.1/git-commit-syntax-0.0.1.vsix",
"git-rebase-syntax": "https://github.com/perrinjerome/git-rebase-syntax/releases/download/v0.0.1/git-rebase-syntax-0.0.1.vsix"
} }
} }
rendered = ${buildout:directory}/${:_buildout_section_name_} rendered = ${buildout:directory}/${:_buildout_section_name_}
...@@ -345,9 +362,7 @@ template = ...@@ -345,9 +362,7 @@ template =
[instance] [instance]
recipe = slapos.recipe.template <= template-base
url = ${:_profile_base_location_}/${:filename}
mode = 0644
output = ${buildout:directory}/instance.cfg output = ${buildout:directory}/instance.cfg
[versions] [versions]
......
...@@ -32,6 +32,7 @@ import logging ...@@ -32,6 +32,7 @@ import logging
import subprocess import subprocess
import tempfile import tempfile
import time import time
import re
from six.moves.urllib.parse import urlparse, urljoin from six.moves.urllib.parse import urlparse, urljoin
import pexpect import pexpect
...@@ -81,6 +82,16 @@ class TestTheia(SlapOSInstanceTestCase): ...@@ -81,6 +82,16 @@ class TestTheia(SlapOSInstanceTestCase):
self.assertEqual(requests.codes.ok, resp.status_code) self.assertEqual(requests.codes.ok, resp.status_code)
self.assertTrue(resp.raw) self.assertTrue(resp.raw)
# there is a CSS referencing fonts
css_text = requests.get(urljoin(authenticated_url, '/css/slapos.css'), verify=False).text
css_urls = re.findall(r'url\([\'"]+([^\)]+)[\'"]+\)', css_text)
self.assertTrue(css_urls)
# and fonts are served
for url in css_urls:
resp = requests.get(urljoin(authenticated_url, url), verify=False)
self.assertEqual(requests.codes.ok, resp.status_code)
self.assertTrue(resp.raw)
def test_theia_slapos(self): def test_theia_slapos(self):
# Make sure we can use the shell and the integrated slapos command # Make sure we can use the shell and the integrated slapos command
process = pexpect.spawnu( process = pexpect.spawnu(
...@@ -134,7 +145,7 @@ class TestTheia(SlapOSInstanceTestCase): ...@@ -134,7 +145,7 @@ class TestTheia(SlapOSInstanceTestCase):
process.wait() process.wait()
def test_theia_shell_execute_tasks(self): def test_theia_shell_execute_tasks(self):
# shell needs to understand -c "comamnd" arguments for theia tasks feature # shell needs to understand -c "command" arguments for theia tasks feature
test_file = '{}/test file'.format(self.computer_partition_root_path) test_file = '{}/test file'.format(self.computer_partition_root_path)
subprocess.check_call([ subprocess.check_call([
'{}/bin/theia-shell'.format(self.computer_partition_root_path), '{}/bin/theia-shell'.format(self.computer_partition_root_path),
......
This diff is collapsed.
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