1616"""Ensure a consistent public package interface."""
1717
1818
19- import gzip
19+ import os
2020
2121import pytest
2222
2323from structurizr import StructurizrClient , StructurizrClientSettings , Workspace
2424
2525
26+ if not (
27+ os .getenv ("SECRET_WORKSPACE_ID" )
28+ and os .getenv ("SECRET_API_KEY" )
29+ and os .getenv ("SECRET_API_SECRET" )
30+ ):
31+ pytest .skip (
32+ "The e2e tests require setting the secret environment variables with the "
33+ "workspace credentials." ,
34+ allow_module_level = True ,
35+ )
36+
37+
2638@pytest .fixture (scope = "module" )
2739def archive_location (tmp_path_factory ):
2840 location = tmp_path_factory .mktemp ("structurizr" )
@@ -32,7 +44,12 @@ def archive_location(tmp_path_factory):
3244@pytest .fixture (scope = "module" )
3345def settings (archive_location ):
3446 """Provide the settings with values taken from the environment."""
35- return StructurizrClientSettings (workspace_archive_location = archive_location )
47+ return StructurizrClientSettings (
48+ workspace_id = os .getenv ("SECRET_WORKSPACE_ID" ),
49+ api_key = os .getenv ("SECRET_API_KEY" ),
50+ api_secret = os .getenv ("SECRET_API_SECRET" ),
51+ workspace_archive_location = archive_location ,
52+ )
3653
3754
3855def test_empty_workspace_without_encryption (settings ):
0 commit comments