Skip to content

Commit

Permalink
ci: Skip Python service tests when access token is absent
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronFriel committed Sep 14, 2022
1 parent d42db65 commit 3354f43
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sdk/python/lib/test/automation/test_errors.py
Expand Up @@ -28,7 +28,7 @@
compilation_error_project = "compilation_error"
runtime_error_project = "runtime_error"


@pytest.mark.skipif("PULUMI_ACCESS_TOKEN" not in os.environ, reason="PULUMI_ACCESS_TOKEN not set")
class TestErrors(unittest.TestCase):
def test_inline_runtime_error_python(self):
project_name = "inline_runtime_error_python"
Expand Down
5 changes: 3 additions & 2 deletions sdk/python/lib/test/automation/test_isolation.py
Expand Up @@ -18,6 +18,7 @@
# operations.

import asyncio
import os
import pytest
import sys
import typing
Expand Down Expand Up @@ -77,7 +78,7 @@ async def async_stack_up(stack):
async def async_stack_destroy(stack):
return stack.destroy()


@pytest.mark.skipif("PULUMI_ACCESS_TOKEN" not in os.environ, reason="PULUMI_ACCESS_TOKEN not set")
@pytest.mark.asyncio
async def test_parallel_updates():
first_stack_name = f"stack-{uuid.uuid4()}"
Expand All @@ -88,7 +89,7 @@ async def test_parallel_updates():
stack_destroy_responses = await asyncio.gather(*[async_stack_destroy(stack) for stack in stacks])
assert all({stack_response.summary.result == "succeeded" for stack_response in stack_destroy_responses})


@pytest.mark.skipif("PULUMI_ACCESS_TOKEN" not in os.environ, reason="PULUMI_ACCESS_TOKEN not set")
@pytest.mark.skipif(
sys.platform == 'win32',
reason="TODO[pulumi/pulumi#8716] fails on Windows")
Expand Down
1 change: 1 addition & 0 deletions sdk/python/lib/test/automation/test_local_workspace.py
Expand Up @@ -109,6 +109,7 @@ def get_stack(stack_list: List[StackSummary], name: str) -> Optional[StackSummar
return None


@pytest.mark.skipif("PULUMI_ACCESS_TOKEN" not in os.environ, reason="PULUMI_ACCESS_TOKEN not set")
class TestLocalWorkspace(unittest.TestCase):
def test_project_settings(self):
for ext in extensions:
Expand Down

0 comments on commit 3354f43

Please sign in to comment.