alan-turing-institute / data-safe-haven

https://data-safe-haven.readthedocs.io
BSD 3-Clause "New" or "Revised" License
57 stars 15 forks source link

Add pulumi tests #1894

Closed jemrobinson closed 4 months ago

jemrobinson commented 4 months ago

:white_check_mark: Checklist

:vertical_traffic_light: Depends on

n/a

:arrow_heading_up: Summary

Adds some proof-of-concept Pulumi unit tests for the SRE ApplicationGateway component.

Note that much of what is described in the Pulumi documentation about Mocking does not seem to work with inline programs.

Important notes:

:closed_umbrella: Related issues

Closes #1835

:microscope: Tests

github-actions[bot] commented 4 months ago

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  data_safe_haven/external/interface
  azure_ipv4_range.py
  data_safe_haven/infrastructure/common
  transformations.py 16, 31, 39, 47, 80, 88, 96, 104, 112
  data_safe_haven/infrastructure/programs/sre
  application_gateway.py
  tests/infrastructure/programs
  resource_assertions.py 9-11
  tests/infrastructure/programs/sre
  conftest.py
  test_application_gateway.py
Project Total  

This report was generated by python-coverage-comment-action

jemrobinson commented 4 months ago

@JimMadge I think the kind of abstract test you're thinking of could be better covered by property tests on deployed infrastructure.