Github user AviaE commented on a diff in the pull request:
https://github.com/apache/incubator-ariatosca/pull/128#discussion_r115502106
--- Diff: tests/cli/test_service_templates.py ---
@@ -131,6 +133,18 @@ def test_store_no_exception(self, monkeypatch,
mock_object):
assert 'Service template {name} stored'.format(
name=mock_models.SERVICE_TEMPLATE_NAME) in
self.logger_output_string
+ def test_store_relative_path_single_yaml_file(self, monkeypatch,
mock_object):
+ monkeypatch.setattr(Core, 'create_service_template', mock_object)
+ monkeypatch.setattr(os.path, 'isfile', lambda x: True)
+ monkeypatch.setattr(service_template_utils, '_is_archive', lambda
x: False)
+
+ self.invoke('service_templates store service_template.yaml
{name}'.format(
+ name=mock_models.SERVICE_TEMPLATE_NAME))
+
+ mock_object.assert_called_with(os.path.join(os.getcwd(),
'service_template.yaml'),
--- End diff --
Nothing serious, just thought that it demonstrates the fact that we are
expecting the paths to be relative to the current working directory.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---