Skip to content

Commit

Permalink
Debugging tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark committed Nov 20, 2023
1 parent 04787a4 commit 5ae03be
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
- name: Running Integration Tests on the Ingest Stage Output 🚀
run: |
poetry run python -m pytest -vvv integration_tests/ -m integration
python -m pytest -vvv integration_tests/ -m integration
env:
INGEST_PIPELINE_BUCKET: ${{ env.INGEST_PIPELINE_BUCKET }}
INGEST_OUTPUT_PREFIX: ${{ env.INGEST_OUTPUT_PREFIX }}
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def get_bucket_files_with_suffix(bucket: S3Path, suffix: str) -> list[S3Path]:
@pytest.fixture
def bucket_path():
"""Get the bucket path."""
return S3Path(os.path.join("s3://", os.environ.get("INGEST_PIPELINE_BUCKET")))
return S3Path(os.path.join("s3://", str(os.environ.get("INGEST_PIPELINE_BUCKET"))))


@pytest.fixture
Expand Down
3 changes: 2 additions & 1 deletion integration_tests/test_pipeline_bucket_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def get_local_fp(file: S3Path) -> Path:

def timestamped_file(file: S3Path) -> bool:
"""Check if a file is timestamped."""
return file.name.startswith("20")
return str(file.name).startswith("20")


@pytest.mark.integration
Expand Down Expand Up @@ -80,6 +80,7 @@ def test_pipeline_bucket_npy(bucket_files_npy):
@pytest.mark.integration
def test_pipeline_bucket_json_errors(bucket_files_json_errors):
"""Test that the pipeline bucket is in the expected state after the ingest stage run."""
assert len(bucket_files_json_errors) > 0
for file in bucket_files_json_errors:
s3_data = json.loads(file.read_text())
local_data = json.loads(get_local_fp(file).read_text())
Expand Down

0 comments on commit 5ae03be

Please sign in to comment.