Commit db30e87b authored by Jérome Perrin's avatar Jérome Perrin

Update tests for softwares with missing promises

Now that slapos node instance no longer use --all ( nexedi/slapos.core!278 ),
some software release test revealed some problems with softwares,
either missing promises or maybe something that needs to be handled in slapos.core.

Using --all was wrong and we want to stop doing this now. Instead of fixing these software now, we keep the old behavior
of using --all only for the softwares with missing promises.


See merge request nexedi/slapos!969
parents a4f0549c fe4d60b9
...@@ -79,6 +79,8 @@ else: ...@@ -79,6 +79,8 @@ else:
os.path.abspath( os.path.abspath(
os.path.join(os.path.dirname(__file__), '..', 'software.cfg'))) os.path.join(os.path.dirname(__file__), '..', 'software.cfg')))
# XXX Keep using slapos node instance --all, because of missing promises
SlapOSInstanceTestCase.slap._force_slapos_node_instance_all = True
# ports chosen to not collide with test systems # ports chosen to not collide with test systems
HTTP_PORT = '11080' HTTP_PORT = '11080'
......
...@@ -61,6 +61,8 @@ if has_kvm: ...@@ -61,6 +61,8 @@ if has_kvm:
os.path.abspath( os.path.abspath(
os.path.join(os.path.dirname(__file__), '..', os.path.join(os.path.dirname(__file__), '..',
'software%s.cfg' % ("-py3" if six.PY3 else "")))) 'software%s.cfg' % ("-py3" if six.PY3 else ""))))
# XXX Keep using slapos node instance --all, because of missing promises
InstanceTestCase.slap._force_slapos_node_instance_all = True
else: else:
setUpModule, InstanceTestCase = None, unittest.TestCase setUpModule, InstanceTestCase = None, unittest.TestCase
......
...@@ -142,6 +142,23 @@ class EdgeSlaveMixin(MonitorTestMixin): ...@@ -142,6 +142,23 @@ class EdgeSlaveMixin(MonitorTestMixin):
instance_max_retry = 20 instance_max_retry = 20
expected_connection_parameter_dict = {} expected_connection_parameter_dict = {}
@classmethod
def setUpClass(cls):
# XXX we run these tests with --all as a workaround for the fact that after
# requesting new shared instances we don't have promise to wait for the
# processing of these shared instances to be completed.
# The sequence is something like this:
# - `requestEdgetestSlaves` will request edgetest partition
# - first `waitForInstance` will process the edgetest partition, which will
# request a edgebot partition, but without promise to wait for the
# processing to be finished, so the first run of `slapos node instance`
# exits with success code and `waitForInstance` return.
# - second `waitForInstance` process the edgebot partition.
# Once we implement a promise (or something similar) here, we should not
# have to use --all
cls.slap._force_slapos_node_instance_all = True
return super(EdgeSlaveMixin, cls).setUpClass()
@classmethod @classmethod
def getInstanceSoftwareType(cls): def getInstanceSoftwareType(cls):
return 'edgetest' return 'edgetest'
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# not need these here). # not need these here).
[monitor2-template] [monitor2-template]
filename = instance-monitor.cfg.jinja2.in filename = instance-monitor.cfg.jinja2.in
md5sum = 84bc2cf29e34b48c51116d93e2be7636 md5sum = 200bb126dbfc33e5c5c165ae17bab64b
[monitor-httpd-conf] [monitor-httpd-conf]
_update_hash_filename_ = templates/monitor-httpd.conf.in _update_hash_filename_ = templates/monitor-httpd.conf.in
......
...@@ -252,6 +252,11 @@ name = monitor-globalstate ...@@ -252,6 +252,11 @@ name = monitor-globalstate
frequency = */2 * * * * frequency = */2 * * * *
command = {{ bin_directory }}/randomsleep 20 && ${monitor-globalstate-wrapper:wrapper-path} command = {{ bin_directory }}/randomsleep 20 && ${monitor-globalstate-wrapper:wrapper-path}
[monitor-globalstate-first-run]
recipe = plone.recipe.command
command = ${monitor-globalstate-wrapper:wrapper-path}
stop-on-error = true
[monitor-configurator-cron-entry] [monitor-configurator-cron-entry]
recipe = slapos.cookbook:cron.d recipe = slapos.cookbook:cron.d
cron-entries = ${cron:cron-entries} cron-entries = ${cron:cron-entries}
...@@ -388,6 +393,7 @@ update-command = ...@@ -388,6 +393,7 @@ update-command =
base-url = ${monitor-conf-parameters:base-url} base-url = ${monitor-conf-parameters:base-url}
depends = depends =
${monitor-globalstate-cron-entry:name} ${monitor-globalstate-cron-entry:name}
${monitor-globalstate-first-run:recipe}
${monitor-configurator-cron-entry:name} ${monitor-configurator-cron-entry:name}
${monitor-collect-cron-entry:name} ${monitor-collect-cron-entry:name}
${cron-entry-logrotate:name} ${cron-entry-logrotate:name}
......
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