Commit 76511465 authored by Bryton Lacquement's avatar Bryton Lacquement 🚪

kvm/test: kvm0 -> KVM0

The kvm software release was recently modified to use
slapos.cookbook:switch-softwaretype instead of the deprecated
slapos.cookbook:softwaretype.

The latter uses ConfigParser to generate
buildout-switch_softwaretype.cfg from template-*.cfg. However,
ConfigParser changes the section keys to lowercase, as shown in the
following example:

>>> from six.moves.configparser import ConfigParser
>>> from io import StringIO
>>> c = ConfigParser()
>>> c.readfp(StringIO("[FOO]\nBAR = BAZ"))
>>> s = StringIO()
>>> c.write(s)
>>> s.getvalue()
'[FOO]\nbar = BAZ\n\n'

This behavior is not present with
slapos.cookbook:switch-softwaretype.
parent 85e6f0aa
......@@ -221,13 +221,13 @@ class TestAccessKvmCluster(MonitorAccessMixin, InstanceTestCase):
def test(self):
connection_parameter_dict = self.computer_partition\
.getConnectionParameterDict()
result = requests.get(connection_parameter_dict['kvm0-url'], verify=False)
result = requests.get(connection_parameter_dict['KVM0-url'], verify=False)
self.assertEqual(
httplib.OK,
result.status_code
)
self.assertIn('<title>noVNC</title>', result.text)
self.assertNotIn('kvm0-url-additional', connection_parameter_dict)
self.assertNotIn('KVM0-url-additional', connection_parameter_dict)
@skipUnlessKvm
......@@ -255,7 +255,7 @@ class TestAccessKvmClusterAdditional(MonitorAccessMixin, InstanceTestCase):
def test(self):
connection_parameter_dict = self.computer_partition\
.getConnectionParameterDict()
result = requests.get(connection_parameter_dict['kvm0-url'], verify=False)
result = requests.get(connection_parameter_dict['KVM0-url'], verify=False)
self.assertEqual(
httplib.OK,
result.status_code
......@@ -263,7 +263,7 @@ class TestAccessKvmClusterAdditional(MonitorAccessMixin, InstanceTestCase):
self.assertIn('<title>noVNC</title>', result.text)
result = requests.get(
connection_parameter_dict['kvm0-url-additional'], verify=False)
connection_parameter_dict['KVM0-url-additional'], verify=False)
self.assertEqual(
httplib.OK,
result.status_code
......
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