test: Skip interactive tests if GITHUB_ACTIONS is defined
This commit is contained in:
@@ -731,10 +731,6 @@ def oauth_callback_server():
|
|||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope="session")
|
@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:
|
async def interactive_oauth_token(oauth_callback_server) -> str:
|
||||||
"""
|
"""
|
||||||
Fixture to obtain an OAuth access token for integration tests.
|
Fixture to obtain an OAuth access token for integration tests.
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
"""Interactive integration tests for OAuth authentication."""
|
"""Interactive integration tests for OAuth authentication."""
|
||||||
|
|
||||||
|
import os
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
@@ -9,6 +10,10 @@ logger = logging.getLogger(__name__)
|
|||||||
pytestmark = [pytest.mark.integration, pytest.mark.oauth]
|
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):
|
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 that OAuth client created via interactive flow can access Nextcloud APIs."""
|
||||||
# Test 1: Check capabilities
|
# Test 1: Check capabilities
|
||||||
|
|||||||
Reference in New Issue
Block a user