Skip to content

Commit

Permalink
fix(test): fix reactive plugin test if 'charm' tool is installed
Browse files Browse the repository at this point in the history
  • Loading branch information
lengau committed Oct 14, 2023
1 parent afd05be commit a4c5ba8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_reactive_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import craft_parts
import pydantic
import pytest
import pytest_subprocess
from craft_parts import plugins
from craft_parts.errors import PluginEnvironmentValidationError

Expand Down Expand Up @@ -134,7 +135,10 @@ def test_validate_environment_with_charm_part(plugin, plugin_properties):
validator.validate_environment(part_dependencies=["charm-tools"])


def test_validate_missing_charm(plugin, plugin_properties):
def test_validate_missing_charm(
fake_process: pytest_subprocess.FakeProcess, plugin, plugin_properties
):
fake_process.register(["/bin/bash", fake_process.any()], returncode=127)
validator = plugin.validator_class(
part_name="my-part", env="/foo", properties=plugin_properties
)
Expand Down

0 comments on commit a4c5ba8

Please sign in to comment.