From f854aac9ae52161d10a363d5b153955d898abbd0 Mon Sep 17 00:00:00 2001 From: Imani Pelton Date: Thu, 5 Dec 2024 08:53:08 -0500 Subject: [PATCH] tests: clear snap-related environment variables (#564) These environment variables may be set if the integration tests are run inside a snapped IDE or terminal. --- tests/unit/services/test_provider.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/unit/services/test_provider.py b/tests/unit/services/test_provider.py index d1842ee3..0d113009 100644 --- a/tests/unit/services/test_provider.py +++ b/tests/unit/services/test_provider.py @@ -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(