From 4ba2d7e301e0f330a749b7a61ae3e9d3ba8da79e Mon Sep 17 00:00:00 2001 From: Carlos Gavidia-Calderon Date: Tue, 3 Dec 2024 09:06:24 +0000 Subject: [PATCH] [WIP] My tests break other tests --- .../programs/sre/test_firewall.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/tests/infrastructure/programs/sre/test_firewall.py b/tests/infrastructure/programs/sre/test_firewall.py index 2abc7a86c9..2d442d1836 100644 --- a/tests/infrastructure/programs/sre/test_firewall.py +++ b/tests/infrastructure/programs/sre/test_firewall.py @@ -7,25 +7,27 @@ import pytest from pulumi_azure_native import network +from data_safe_haven.infrastructure.programs.sre.firewall import ( + SREFirewallComponent, + SREFirewallProps, +) + from ..resource_assertions import assert_equal class MyMocks(pulumi.runtime.Mocks): def new_resource(self, args: pulumi.runtime.MockResourceArgs): - return [args.name + "_id", args.inputs] + resources = [args.name + "_id", args.inputs] + return resources def call(self, _: pulumi.runtime.MockCallArgs): return {} +# TODO: These breaks many other tests! pulumi.runtime.set_mocks( MyMocks(), - preview=False, # Sets the flag `dry_run`, which is true at runtime during a preview. -) - -from data_safe_haven.infrastructure.programs.sre.firewall import ( - SREFirewallComponent, - SREFirewallProps, + preview=False, ) @@ -168,5 +170,6 @@ def assert_allow_internet_access( assert not workspace_deny_collection else: assert len(workspace_deny_collection) == 1 + else: raise AssertionError()