Skip to content

Commit

Permalink
release 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Sispheor committed Nov 25, 2022
1 parent 135f93f commit 4c59f5a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace: hpe
name: monkeyble

# The version of the collection. Must be compatible with semantic versioning
version: 1.0.3
version: 1.1.0

# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
setup(
name='monkeyble',
description='End-to-end testing framework for Ansible',
version='1.1.0.dev0',
version='1.1.0',
long_description=long_description,
long_description_content_type='text/markdown',
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
Expand Down
21 changes: 13 additions & 8 deletions tests/units/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import io
import os
import pathlib
import unittest
from unittest import mock
from unittest.mock import patch, mock_open, call
Expand Down Expand Up @@ -30,15 +31,19 @@ def test_load_monkeyble_config_from_args(self):
load_monkeyble_config("/path/to/monkeyble.yml")
mock_open_file.assert_called_with("/path/to/monkeyble.yml", 'r')

@patch("monkeyble.cli.monkeyble_cli.MONKEYBLE_DEFAULT_CONFIG_PATH", "test_config/monkeyble.yml")
# fix path when executed as standalone test
@patch("monkeyble.cli.monkeyble_cli.MONKEYBLE_DEFAULT_CONFIG_PATH", "tests/units/test_config/monkeyble.yml")
def test_load_monkeyble_config(self):
data = load_monkeyble_config(None)
expected = {'monkeyble_test_suite': [{'playbook': 'test_playbook.yml',
'inventory': 'inventory',
'extra_vars': ['mocks.yml', 'monkeyble_scenarios.yml'],
'scenarios': ['validate_test_1', 'validate_test_2']}]}

self.assertDictEqual(data, expected)
current_path = pathlib.Path(__file__).parent.resolve()
test_monkeyble_path = str(current_path) + "/test_config/monkeyble.yml"
with mock.patch("monkeyble.cli.monkeyble_cli.MONKEYBLE_DEFAULT_CONFIG_PATH", test_monkeyble_path):
data = load_monkeyble_config(None)
expected = {'monkeyble_test_suite': [{'playbook': 'test_playbook.yml',
'inventory': 'inventory',
'extra_vars': ['mocks.yml', 'monkeyble_scenarios.yml'],
'scenarios': ['validate_test_1', 'validate_test_2']}]}

self.assertDictEqual(data, expected)

@patch('sys.exit')
def test_do_exit_all_test_passed(self, mock_exit):
Expand Down

0 comments on commit 4c59f5a

Please sign in to comment.