From 2ae3c423e946f6e27f1a1187e9eb9974b79f86d2 Mon Sep 17 00:00:00 2001 From: Chris Coutinho Date: Mon, 13 Oct 2025 20:54:21 +0200 Subject: [PATCH] test: Skip interactive tests if GITHUB_ACTIONS is defined --- tests/conftest.py | 4 ---- tests/integration/test_oauth_interactive.py | 5 +++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 43d2245..8a55fa8 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -731,10 +731,6 @@ def oauth_callback_server(): @pytest.fixture(scope="session") -@pytest.mark.skipif( - "GITHUB_ACTION" in os.environ, - reason="Unable to access interactive browser in GitHub Actions", -) async def interactive_oauth_token(oauth_callback_server) -> str: """ Fixture to obtain an OAuth access token for integration tests. diff --git a/tests/integration/test_oauth_interactive.py b/tests/integration/test_oauth_interactive.py index 3652769..fdd4402 100644 --- a/tests/integration/test_oauth_interactive.py +++ b/tests/integration/test_oauth_interactive.py @@ -1,5 +1,6 @@ """Interactive integration tests for OAuth authentication.""" +import os import logging import pytest @@ -9,6 +10,10 @@ logger = logging.getLogger(__name__) pytestmark = [pytest.mark.integration, pytest.mark.oauth] +@pytest.mark.skipif( + "GITHUB_ACTIONS" in os.environ, + reason="Unable to access interactive browser in GitHub Actions", +) async def test_oauth_client_with_interactive_flow(nc_oauth_client_interactive): """Test that OAuth client created via interactive flow can access Nextcloud APIs.""" # Test 1: Check capabilities