Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/marker-report-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
# makes use of the marker report plugin localstack.testing.pytest.marker_report
- name: Generate marker report
env:
PYTEST_ADDOPTS: "-p no:localstack.testing.pytest.fixtures -p no:localstack.testing.pytest.snapshot -p no:localstack.testing.pytest.filters -p no:localstack.testing.pytest.fixture_conflicts -p no:tests.fixtures -s --co --disable-warnings --marker-report --marker-report-path './target'"
PYTEST_ADDOPTS: "-p no:localstack.testing.pytest.fixtures -p no:localstack_snapshot.pytest.snapshot -p no:localstack.testing.pytest.filters -p no:localstack.testing.pytest.fixture_conflicts -p no:tests.fixtures -s --co --disable-warnings --marker-report --marker-report-path './target'"
MARKER_REPORT_PROJECT_NAME: localstack
MARKER_REPORT_COMMIT_SHA: ${{ github.sha }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/marker-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

- name: Collect marker report
env:
PYTEST_ADDOPTS: "-p no:localstack.testing.pytest.fixtures -p no:localstack.testing.pytest.snapshot -p no:localstack.testing.pytest.filters -p no:localstack.testing.pytest.fixture_conflicts -p no:tests.fixtures -s --co --disable-warnings --marker-report --marker-report-tinybird-upload"
PYTEST_ADDOPTS: "-p no:localstack.testing.pytest.fixtures -p no:localstack_snapshot.pytest.snapshot -p no:localstack.testing.pytest.filters -p no:localstack.testing.pytest.fixture_conflicts -p no:tests.fixtures -s --co --disable-warnings --marker-report --marker-report-tinybird-upload"
MARKER_REPORT_PROJECT_NAME: localstack
MARKER_REPORT_TINYBIRD_TOKEN: ${{ secrets.MARKER_REPORT_TINYBIRD_TOKEN }}
MARKER_REPORT_COMMIT_SHA: ${{ github.sha }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,6 @@ jobs:
pip install pytest pytest-tinybird
- name: Run CLI tests
env:
PYTEST_ADDOPTS: "${{ env.TINYBIRD_PYTEST_ARGS }}-p no:localstack.testing.pytest.fixtures -p no:localstack.testing.pytest.snapshot -p no:localstack.testing.pytest.filters -p no:localstack.testing.pytest.fixture_conflicts -p no:localstack.testing.pytest.validation_tracking -p no:tests.fixtures -s"
PYTEST_ADDOPTS: "${{ env.TINYBIRD_PYTEST_ARGS }}-p no:localstack.testing.pytest.fixtures -p no:localstack_snapshot.pytest.snapshot -p no:localstack.testing.pytest.filters -p no:localstack.testing.pytest.fixture_conflicts -p no:localstack.testing.pytest.validation_tracking -p no:tests.fixtures -s"
run: |
python -m pytest tests/cli/
9 changes: 9 additions & 0 deletions localstack/testing/pytest/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
AWS_REGION_US_EAST_1,
SECONDARY_TEST_AWS_ACCOUNT_ID,
TEST_AWS_ACCOUNT_ID,
TEST_AWS_REGION_NAME,
)
from localstack.services.stores import (
AccountRegionBundle,
Expand Down Expand Up @@ -1798,6 +1799,14 @@ def cleanups():
LOG.warning("Failed to execute cleanup", exc_info=e)


@pytest.fixture(scope="session")
def region(aws_client):
if is_aws_cloud() or is_api_enabled("sts"):
return aws_client.sts.meta.region_name
else:
return TEST_AWS_REGION_NAME


@pytest.fixture(scope="session")
def account_id(aws_client):
if is_aws_cloud() or is_api_enabled("sts"):
Expand Down
172 changes: 0 additions & 172 deletions localstack/testing/pytest/snapshot.py

This file was deleted.

3 changes: 0 additions & 3 deletions localstack/testing/snapshots/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
from .prototype import SnapshotAssertionError, SnapshotMatchResult, SnapshotSession

__all__ = [SnapshotSession, SnapshotMatchResult, SnapshotAssertionError]
Loading