Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xiaowu Zhang
slapos
Commits
99c9ae46
Commit
99c9ae46
authored
Aug 17, 2021
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Plain Diff
erp5testnode: Shorten instance partition paths
See merge request
nexedi/slapos!992
parents
64d49a96
ca856049
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
190 additions
and
34 deletions
+190
-34
software/erp5testnode/buildout.hash.cfg
software/erp5testnode/buildout.hash.cfg
+3
-3
software/erp5testnode/instance-default.cfg.jinja.in
software/erp5testnode/instance-default.cfg.jinja.in
+41
-20
software/erp5testnode/instance.cfg
software/erp5testnode/instance.cfg
+30
-2
software/erp5testnode/software.cfg
software/erp5testnode/software.cfg
+3
-3
software/erp5testnode/test/README.md
software/erp5testnode/test/README.md
+1
-0
software/erp5testnode/test/setup.py
software/erp5testnode/test/setup.py
+52
-0
software/erp5testnode/test/test.py
software/erp5testnode/test/test.py
+47
-0
software/slapos-sr-testing/software.cfg
software/slapos-sr-testing/software.cfg
+12
-5
stack/slapos.cfg
stack/slapos.cfg
+1
-1
No files found.
software/erp5testnode/buildout.hash.cfg
View file @
99c9ae46
...
@@ -14,8 +14,8 @@
...
@@ -14,8 +14,8 @@
# not need these here).
# not need these here).
[template]
[template]
filename = instance.cfg
filename = instance.cfg
md5sum =
307663d73ef3ef94b02567ecd322252e
md5sum =
d9c7c3acb975d44c6c66ca32c550ac58
[template-default]
[template-default]
filename = instance-default.cfg
filename = instance-default.cfg
.jinja.in
md5sum =
24cc143b1886d443a4c29dcb8147a01c
md5sum =
ffb6b74b55e7ca01666254353ae1cebe
software/erp5testnode/instance-default.cfg
→
software/erp5testnode/instance-default.cfg
.jinja.in
View file @
99c9ae46
[buildout]
{%- set slapparameter_dict = dict(default_parameter_dict, **slapparameter_dict) -%}
[buildout]
eggs-directory = ${buildout:eggs-directory}
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
...
@@ -18,6 +20,7 @@ parts =
...
@@ -18,6 +20,7 @@ parts =
resiliency-exclude-file
resiliency-exclude-file
shellinabox-frontend-reload
shellinabox-frontend-reload
promises
promises
testnode-compatibility
[monitor-publish]
[monitor-publish]
recipe = slapos.cookbook:publish
recipe = slapos.cookbook:publish
...
@@ -35,20 +38,24 @@ slapos-directory = $${directory:slapos}
...
@@ -35,20 +38,24 @@ slapos-directory = $${directory:slapos}
working-directory = $${directory:testnode}
working-directory = $${directory:testnode}
test-suite-directory = $${directory:test-suite}
test-suite-directory = $${directory:test-suite}
shared-part-list = $${directory:shared}
shared-part-list = $${directory:shared}
proxy-host =
$${slap-network-information:local-ipv4
}
proxy-host =
{{ partition_ipv4 }
}
proxy-port = 5000
proxy-port = 5000
log-directory = $${directory:log}
log-directory = $${directory:log}
srv-directory = $${rootdirectory:srv}
srv-directory = $${rootdirectory:srv}
software-directory = $${directory:software}
software-directory = $${directory:software}
run-directory = $${directory:run}
run-directory = $${directory:run}
test-node-title = $${slap-parameter:test-node-title}
test-node-title = {{ slapparameter_dict['test-node-title'] }}
node-quantity = $${slap-parameter:node-quantity}
node-quantity = {{ slapparameter_dict['node-quantity'] }}
ipv4-address = $${slap-network-information:local-ipv4}
ipv4-address = {{ partition_ipv4 }}
ipv6-address = $${slap-network-information:global-ipv6}
ipv6-address = {{ partition_ipv6 }}
test-suite-master-url = $${slap-parameter:test-suite-master-url}
test-suite-master-url = {{ slapparameter_dict['test-suite-master-url'] }}
instance-dict = $${slap-parameter:instance-dict}
instance-dict = {{ slapparameter_dict['instance-dict'] }}
software-path-list = $${slap-parameter:software-path-list}
{%- if isinstance(slapparameter_dict['software-path-list'], str) %}
keep-log-days = $${slap-parameter:keep-log-days}
software-path-list = {{ slapparameter_dict['software-path-list'] }}
{%- else %}
software-path-list = {{ json.dumps(slapparameter_dict['software-path-list']) }}
{%- endif %}
keep-log-days = {{ slapparameter_dict['keep-log-days'] }}
git-binary = ${git:location}/bin/git
git-binary = ${git:location}/bin/git
slapos-binary = ${buildout:bin-directory}/slapos
slapos-binary = ${buildout:bin-directory}/slapos
testnode = ${buildout:bin-directory}/testnode
testnode = ${buildout:bin-directory}/testnode
...
@@ -59,7 +66,7 @@ httpd-conf-file = $${rootdirectory:etc}/httpd.conf
...
@@ -59,7 +66,7 @@ httpd-conf-file = $${rootdirectory:etc}/httpd.conf
httpd-wrapper = $${rootdirectory:bin}/httpd
httpd-wrapper = $${rootdirectory:bin}/httpd
httpd-port = 9080
httpd-port = 9080
httpd-software-access-port = 9081
httpd-software-access-port = 9081
httpd-ip =
$${slap-network-information:global-ipv6
}
httpd-ip =
{{ partition_ipv6 }
}
httpd-log-directory = $${basedirectory:log}
httpd-log-directory = $${basedirectory:log}
httpd-software-directory = $${directory:software}
httpd-software-directory = $${directory:software}
httpd-cert-file = $${rootdirectory:etc}/httpd-public.crt
httpd-cert-file = $${rootdirectory:etc}/httpd-public.crt
...
@@ -117,7 +124,7 @@ template = inline:
...
@@ -117,7 +124,7 @@ template = inline:
/
/
}
}
}
}
ipv6 =
$${slap-network-information:global-ipv6
}
ipv6 =
{{ partition_ipv6 }
}
hostname = [$${:ipv6}]
hostname = [$${:ipv6}]
port = 8080
port = 8080
username = testnode
username = testnode
...
@@ -200,7 +207,7 @@ run = $${rootdirectory:var}/run
...
@@ -200,7 +207,7 @@ run = $${rootdirectory:var}/run
[directory]
[directory]
recipe = slapos.cookbook:mkdirectory
recipe = slapos.cookbook:mkdirectory
slapos = $${rootdirectory:srv}/slapos
slapos = $${rootdirectory:srv}/slapos
testnode = $${
rootdirectory:srv}/testnode
testnode = $${
buildout:directory}/t
shared = $${rootdirectory:srv}/shared
shared = $${rootdirectory:srv}/shared
test-suite = $${rootdirectory:srv}/test_suite
test-suite = $${rootdirectory:srv}/test_suite
log = $${basedirectory:log}/testnode
log = $${basedirectory:log}/testnode
...
@@ -209,6 +216,16 @@ software = $${rootdirectory:srv}/software
...
@@ -209,6 +216,16 @@ software = $${rootdirectory:srv}/software
shellinabox = $${rootdirectory:srv}/shellinabox
shellinabox = $${rootdirectory:srv}/shellinabox
ca-dir = $${rootdirectory:srv}/ca
ca-dir = $${rootdirectory:srv}/ca
[testnode-compatibility]
# Remove old ~/srv/testnode
recipe = slapos.recipe.build
update =
import os
from zc.buildout.rmtree import rmtree
old_testnode_path = self.buildout['rootdirectory']['srv'] + '/testnode'
if os.path.exists(old_testnode_path):
rmtree(old_testnode_path)
[resiliency-exclude-file]
[resiliency-exclude-file]
# Generate rdiff exclude file in case of resiliency
# Generate rdiff exclude file in case of resiliency
recipe = collective.recipe.template
recipe = collective.recipe.template
...
@@ -239,6 +256,7 @@ config-url = https://[$${testnode:httpd-ip}]:$${testnode:httpd-port}
...
@@ -239,6 +256,7 @@ config-url = https://[$${testnode:httpd-ip}]:$${testnode:httpd-port}
recipe =
recipe =
instance-promises =
instance-promises =
$${shellinabox-frontend-listen-promise:name}
$${shellinabox-frontend-listen-promise:name}
# $${shellinabox-frontend-available-promise:name}
$${testnode-log-frontend-promise:name}
$${testnode-log-frontend-promise:name}
[shellinabox-frontend-listen-promise]
[shellinabox-frontend-listen-promise]
...
@@ -248,15 +266,18 @@ name = $${:_buildout_section_name_}.py
...
@@ -248,15 +266,18 @@ name = $${:_buildout_section_name_}.py
config-host = $${shellinabox-frontend:hostname}
config-host = $${shellinabox-frontend:hostname}
config-port = $${shellinabox-frontend:port}
config-port = $${shellinabox-frontend:port}
## This promise fails in a test suite
## due to ports conflict with the testnode of the test suite
# [shellinabox-frontend-available-promise]
# <= monitor-promise-base
# module = check_url_available
# name = $${:_buildout_section_name_}.py
# config-url = https://$${shellinabox-frontend-config:hostname}:$${shellinabox-frontend-config:port}
# config-username = $${shellinabox-frontend-config:username}
# config-password = $${shellinabox-frontend-config:passwd}
[testnode-log-frontend-promise]
[testnode-log-frontend-promise]
<= monitor-promise-base
<= monitor-promise-base
module = check_url_available
module = check_url_available
name = $${:_buildout_section_name_}.py
name = $${:_buildout_section_name_}.py
config-url = $${testnode-log-frontend:connection-secure_access}
config-url = $${testnode-log-frontend:connection-secure_access}
[slap-parameter]
node-quantity = 1
test-suite-master-url =
instance-dict =
software-path-list = ["https://lab.nexedi.com/nexedi/slapos/raw/1.0.181/software/seleniumrunner/software.cfg"]
keep-log-days = 15
software/erp5testnode/instance.cfg
View file @
99c9ae46
...
@@ -6,6 +6,34 @@ eggs-directory = ${buildout:eggs-directory}
...
@@ -6,6 +6,34 @@ eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
offline = true
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration
computer = $${slap-connection:computer-id}
partition = $${slap-connection:partition-id}
url = $${slap-connection:server-url}
key = $${slap-connection:key-file}
cert = $${slap-connection:cert-file}
[switch_softwaretype]
[switch_softwaretype]
recipe = slapos.cookbook:softwaretype
recipe = slapos.cookbook:switch-softwaretype
default = ${template-default:output}
RootSoftwareInstance = $${:default}
default = instance-default:rendered
[instance-default]
recipe = slapos.recipe.template:jinja2
template = ${template-default:output}
rendered = $${buildout:directory}/instance-default.cfg
context =
import json json
jsonkey default_parameter_dict :default-parameters
key slapparameter_dict slap-configuration:configuration
key partition_ipv6 slap-configuration:ipv6-random
key partition_ipv4 slap-configuration:ipv4-random
default-parameters =
{
"node-quantity": 1,
"test-suite-master-url": "",
"instance-dict": "",
"software-path-list": ["https://lab.nexedi.com/nexedi/slapos/raw/1.0.181/software/seleniumrunner/software.cfg"],
"keep-log-days": 15
}
software/erp5testnode/software.cfg
View file @
99c9ae46
...
@@ -31,14 +31,14 @@ eggs =
...
@@ -31,14 +31,14 @@ eggs =
[template]
[template]
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/
instance.cfg
url = ${:_profile_base_location_}/
${:filename}
output = ${buildout:directory}/template.cfg
output = ${buildout:directory}/template.cfg
mode = 0644
mode = 0644
[template-default]
[template-default]
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/
instance-default.cfg
url = ${:_profile_base_location_}/
${:filename}
output = ${buildout:directory}/template-default.cfg
output = ${buildout:directory}/template-default.cfg
.jinja
mode = 0644
mode = 0644
[versions]
[versions]
...
...
software/erp5testnode/test/README.md
0 → 100644
View file @
99c9ae46
Tests for erp5testnode software release
software/erp5testnode/test/setup.py
0 → 100644
View file @
99c9ae46
##############################################################################
#
# Copyright (c) 2019 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from
setuptools
import
setup
,
find_packages
version
=
'0.0.1.dev0'
name
=
'slapos.test.erp5testnode'
with
open
(
"README.md"
)
as
f
:
long_description
=
f
.
read
()
setup
(
name
=
name
,
version
=
version
,
description
=
"Test for SlapOS' erp5testnode"
,
long_description
=
long_description
,
long_description_content_type
=
'text/markdown'
,
maintainer
=
"Nexedi"
,
maintainer_email
=
"info@nexedi.com"
,
url
=
"https://lab.nexedi.com/nexedi/slapos"
,
packages
=
find_packages
(),
install_requires
=
[
'slapos.core'
,
'slapos.libnetworkcache'
,
'erp5.util'
,
'requests'
,
],
zip_safe
=
True
,
test_suite
=
'test'
,
)
software/erp5testnode/test/test.py
0 → 100644
View file @
99c9ae46
##############################################################################
#
# Copyright (c) 2019 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import
os
import
requests
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
setUpModule
,
SlapOSInstanceTestCase
=
makeModuleSetUpAndTestCaseClass
(
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'..'
,
'software.cfg'
)))
class
TestnodeTest
(
SlapOSInstanceTestCase
):
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
"test-node-title"
:
"hello"
}
def
test
(
self
):
connexion_parameters
=
self
.
computer_partition
.
getConnectionParameterDict
()
self
.
assertIn
(
'url'
,
connexion_parameters
)
self
.
assertIn
(
'frontend-url'
,
connexion_parameters
)
self
.
assertIn
(
'log-frontend-url'
,
connexion_parameters
)
software/slapos-sr-testing/software.cfg
View file @
99c9ae46
...
@@ -199,16 +199,21 @@ setup = ${slapos-repository:location}/software/galene/test/
...
@@ -199,16 +199,21 @@ setup = ${slapos-repository:location}/software/galene/test/
egg = slapos.test.headless-chromium
egg = slapos.test.headless-chromium
setup = ${slapos-repository:location}/software/headless-chromium/test/
setup = ${slapos-repository:location}/software/headless-chromium/test/
[slapos.core-repository]
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/slapos.core.git
branch = master
[slapos.test.caucase-setup]
[slapos.test.caucase-setup]
<= setup-develop-egg
<= setup-develop-egg
egg = slapos.test.caucase
egg = slapos.test.caucase
setup = ${slapos-repository:location}/software/caucase/test/
setup = ${slapos-repository:location}/software/caucase/test/
[slapos.test.erp5testnode-setup]
<= setup-develop-egg
egg = slapos.test.erp5testnode
setup = ${slapos-repository:location}/software/erp5testnode/test/
[slapos.core-repository]
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/slapos.core.git
branch = master
[slapos.core-setup]
[slapos.core-setup]
<= setup-develop-egg
<= setup-develop-egg
egg = slapos.core
egg = slapos.core
...
@@ -260,6 +265,7 @@ extra-eggs =
...
@@ -260,6 +265,7 @@ extra-eggs =
${slapos.test.html5as-base-setup:egg}
${slapos.test.html5as-base-setup:egg}
${slapos.test.fluentd-setup:egg}
${slapos.test.fluentd-setup:egg}
${slapos.test.headless-chromium-setup:egg}
${slapos.test.headless-chromium-setup:egg}
${slapos.test.erp5testnode-setup:egg}
# We don't name this interpreter `python`, so that when we run slapos node
# We don't name this interpreter `python`, so that when we run slapos node
# software, installation scripts running `python` use a python without any
# software, installation scripts running `python` use a python without any
...
@@ -343,6 +349,7 @@ extra =
...
@@ -343,6 +349,7 @@ extra =
jscrawler ${slapos.test.jscrawler-setup:setup}
jscrawler ${slapos.test.jscrawler-setup:setup}
html5as ${slapos.test.html5as-setup:setup}
html5as ${slapos.test.html5as-setup:setup}
html5as-base ${slapos.test.html5as-base-setup:setup}
html5as-base ${slapos.test.html5as-base-setup:setup}
erp5testnode ${slapos.test.erp5testnode-setup:setup}
[versions]
[versions]
# slapos.core is used from the clone always
# slapos.core is used from the clone always
...
...
stack/slapos.cfg
View file @
99c9ae46
...
@@ -224,7 +224,7 @@ atomize = 0.2.0
...
@@ -224,7 +224,7 @@ atomize = 0.2.0
croniter = 0.3.25
croniter = 0.3.25
dnspython = 1.16.0
dnspython = 1.16.0
enum34 = 1.1.10
enum34 = 1.1.10
erp5.util = 0.4.
69
erp5.util = 0.4.
70
feedparser = 5.2.1
feedparser = 5.2.1
functools32 = 3.2.3.post2
functools32 = 3.2.3.post2
attrs = 18.2.0
attrs = 18.2.0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment