Skip to content

Commit

Permalink
Add build env creation test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
ncoghlan committed Nov 7, 2024
1 parent e729e80 commit a10d4bc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_minimal_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,13 @@ def get_deployed_env_details(

self.check_deployed_environments(layered_metadata, get_deployed_env_details)

def test_create_environments(self) -> None:
# Fast test to check the links between build envs are set up correctly
# (if this fails, there's no point even trying to full slow test case)
build_env = self.build_env
build_env.create_environments()
self.check_build_environments(self.build_env.all_environments())

@pytest.mark.slow
def test_locking_and_publishing(self) -> None:
# This is organised as subtests in a monolothic test sequence to reduce CI overhead
Expand Down
7 changes: 7 additions & 0 deletions tests/test_sample_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,13 @@ def setUp(self) -> None:
self.artifact_export_path = get_artifact_export_path()
self.export_on_success = force_artifact_export()

def test_create_environments(self) -> None:
# Fast test to check the links between build envs are set up correctly
# (if this fails, there's no point even trying to full slow test case)
build_env = self.build_env
build_env.create_environments()
self.check_build_environments(self.build_env.all_environments())

@pytest.mark.slow
@pytest.mark.expected_output
def test_build_is_reproducible(self) -> None:
Expand Down

0 comments on commit a10d4bc

Please sign in to comment.