Skip to content

Commit

Permalink
tests: clear snap-related environment variables (#564)
Browse files Browse the repository at this point in the history
These environment variables may be set if the integration tests are run inside a snapped IDE or terminal.
  • Loading branch information
bepri authored Dec 5, 2024
1 parent 6a798fe commit f854aac
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/unit/services/test_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ def test_install_snap(
):
monkeypatch.delenv("SNAP", raising=False)
monkeypatch.delenv("CRAFT_SNAP_CHANNEL", raising=False)
monkeypatch.delenv("SNAP_INSTANCE_NAME", raising=False)
monkeypatch.delenv("SNAP_NAME", raising=False)
monkeypatch.delenv("CRAFT_SNAP_CHANNEL", raising=False)
for name, value in environment.items():
monkeypatch.setenv(name, value)
service = provider.ProviderService(
Expand Down

0 comments on commit f854aac

Please sign in to comment.