Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch executor manager to ignore extra plugins discovered during CI tests #1870

Merged
merged 2 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading