Skip to content

Commit

Permalink
Patch executor manager to ignore extra plugins discovered during CI t…
Browse files Browse the repository at this point in the history
…ests (#1870)

* patch executor manager to ignore extra plugins

* update changelog
  • Loading branch information
araghukas authored Nov 30, 2023
1 parent 2e05b04 commit 75b8272
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [UNRELEASED]

### Operations

- Ignore custom executor plugin in how-to's when running `test_deploy_status` CLI test.

### Changed

- Terraform output to use scrolling buffer.
Expand Down
14 changes: 14 additions & 0 deletions tests/covalent_dispatcher_tests/_cli/cli_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,25 @@ def test_deploy_status(mocker):
Unit test for `covalent deploy status [executor_name]` command.
"""

from covalent.executor import _executor_manager
from covalent_dispatcher._cli.groups.deploy_group import status

# Succeed with empty `executor_names` argument.
# Ignoring extra plugin(s) discovered in CI tests environment.
filtered_plugins_map = {
k: v
for k, v in _executor_manager.executor_plugins_map.items()
if k not in ["timing_plugin"]
}
mock_executor_manager = mocker.patch.object(
_executor_manager,
"executor_plugins_map",
return_value=filtered_plugins_map,
)

ctx = click.Context(status)
ctx.invoke(status, executor_names=[])
mocker.stop(mock_executor_manager) # stop ignoring any plugins

# Succeed with invalid `executor_names` argument.
mock_click_style = mocker.patch("click.style")
Expand Down

0 comments on commit 75b8272

Please sign in to comment.