Commit 133c9b7a authored by Jérome Perrin's avatar Jérome Perrin

cli: update logged message for `slapos request`

 - fix the test failure introduced recently
 - fix grammar
 - log the software URL without ... at the end, so that we can click
   the link or copy it more easily
parent b7563d36
......@@ -166,7 +166,7 @@ def _validateRequestParameters(software_schema, parameter_dict):
)
def do_request(logger, conf, local):
logger.info('Validating parameters for %s as instance of %s...',
logger.info('Validating request parameters for %s as an instance of %s ...',
conf.reference, conf.software_url)
conf.software_url = _getSoftwareReleaseFromSoftwareString(
......@@ -195,7 +195,7 @@ def do_request(logger, conf, local):
parameters,
)
logger.info('Requesting %s as instance of %s...',
logger.info('Requesting %s as an instance of %s ...',
conf.reference, conf.software_url)
try:
partition = local['slap'].registerOpenOrder().request(
......
......@@ -945,7 +945,9 @@ class TestCliRequest(CliMixin):
shared=False,
)
self.assertEqual(self.logger.info.mock_calls, [
mock.call('Requesting %s as instance of %s...',
mock.call('Validating request parameters for %s as an instance of %s ...',
'instance reference', software_url),
mock.call('Requesting %s as an instance of %s ...',
'instance reference', software_url),
mock.call('Instance requested.\nState is : %s.', 'started'),
mock.call('Connection parameters of instance are:'),
......@@ -1302,7 +1304,7 @@ class TestCliRequestParametersFileJson(TestCliRequestParameterFile):
shared=False,
)
self.logger.info.assert_any_call(
'Requesting %s as instance of %s...',
'Requesting %s as an instance of %s ...',
'instance reference',
'software URL',
)
......@@ -1379,7 +1381,7 @@ class TestCliRequestForceSerialisation(TestCliRequestParameterFile):
shared=False,
)
self.logger.info.assert_any_call(
'Requesting %s as instance of %s...',
'Requesting %s as an instance of %s ...',
'instance reference',
'software URL',
)
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