Commit ab285b26 authored by Xavier Thompson's avatar Xavier Thompson

software/slaprunner: Enable hateoas in slapos.cfg

parent c5172a7f
...@@ -50,7 +50,7 @@ md5sum = 7a2f5e25a818cb29964666ada7852a5c ...@@ -50,7 +50,7 @@ md5sum = 7a2f5e25a818cb29964666ada7852a5c
[template-slapos-cfg] [template-slapos-cfg]
filename = template/slapos.cfg.in filename = template/slapos.cfg.in
md5sum = 3b228b26a170f3c07c50a0f2ae056daf md5sum = 03322b8a0f42ea579d35981211359190
[template-slapformat-definition.cfg] [template-slapformat-definition.cfg]
filename = template/slapformat-definition.cfg.in filename = template/slapformat-definition.cfg.in
......
...@@ -13,6 +13,7 @@ shared_part_list = ...@@ -13,6 +13,7 @@ shared_part_list =
{%- endfor %} {%- endfor %}
{{ slaprunner['shared_root'] }} {{ slaprunner['shared_root'] }}
master_url = http://{{ slaprunner['ipv4'] }}:{{ slaprunner['proxy_port'] }} master_url = http://{{ slaprunner['ipv4'] }}:{{ slaprunner['proxy_port'] }}
master_rest_url = http://{{ slaprunner['ipv4'] }}:{{ slaprunner['proxy_port'] }}/hateoas
computer_id = slaprunner computer_id = slaprunner
maximal_delay = 0 maximal_delay = 0
root_check = {{ slaprunner['root_check'] }} root_check = {{ slaprunner['root_check'] }}
......
...@@ -53,10 +53,6 @@ setUpModule, SlapOSInstanceTestCase = makeModuleSetUpAndTestCaseClass( ...@@ -53,10 +53,6 @@ setUpModule, SlapOSInstanceTestCase = makeModuleSetUpAndTestCaseClass(
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 ""))))
class SlaprunnerTestCase(SlapOSInstanceTestCase):
# Slaprunner uses unix sockets, so it needs short paths.
__partition_reference__ = 's'
class SlaprunnerTestCase(SlapOSInstanceTestCase): class SlaprunnerTestCase(SlapOSInstanceTestCase):
# Slaprunner uses unix sockets, so it needs short paths. # Slaprunner uses unix sockets, so it needs short paths.
__partition_reference__ = 's' __partition_reference__ = 's'
...@@ -423,14 +419,14 @@ class TestSlapOS(SlaprunnerTestCase): ...@@ -423,14 +419,14 @@ class TestSlapOS(SlaprunnerTestCase):
def test_slapos_command(self): def test_slapos_command(self):
# in ~/bin/slapos there is a wrapper setting configuration to use slapos from # in ~/bin/slapos there is a wrapper setting configuration to use slapos from
# the web runner. # the web runner.
proxy_show_output = subprocess.check_output( slapos = os.path.join(self.computer_partition_root_path, 'bin', 'slapos')
( # ensure the node is formatted
os.path.join(self.computer_partition_root_path, 'bin', 'slapos'), subprocess.check_call((slapos, 'node', 'format', '--now'), env={})
'proxy', proxy_show_output = subprocess.check_output((slapos, 'proxy', 'show'), env={})
'show',
),
env={})
self.assertIn(b'slaprunner', proxy_show_output) self.assertIn(b'slaprunner', proxy_show_output)
# check hateoas cli support
computer_list_output = subprocess.check_output((slapos, 'computer', 'list'), env={})
self.assertIn(b'slaprunner', computer_list_output)
def test_shared_part_list(self): def test_shared_part_list(self):
# this slapos used shared_part_list # this slapos used shared_part_list
......
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