Skip to content

Commit

Permalink
Revert no-delete flag for ODCR stack
Browse files Browse the repository at this point in the history
Revert a4a04ba
Reason is that it is bad to use the cfn_stacks_factory session fixture from a class fixture: this can cause underlying session resources being deleted between test executions

Signed-off-by: Luca Carrogu <[email protected]>
  • Loading branch information
lukeseawalker committed Feb 14, 2023
1 parent 036bd43 commit 3da6e56
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions tests/integration-tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1380,10 +1380,7 @@ def placement_group_stack(cfn_stacks_factory, request, region):

yield stack

if not request.config.getoption("no_delete"):
cfn_stacks_factory.delete_stack(stack.name, region)
else:
logging.warning("Skipping deletion of CFN stacks because --no-delete option is set")
cfn_stacks_factory.delete_stack(stack.name, region)


@pytest.fixture(scope="class")
Expand Down Expand Up @@ -1524,10 +1521,7 @@ def odcr_stack(request, region, placement_group_stack, cfn_stacks_factory, vpc_s

yield stack

if not request.config.getoption("no_delete"):
cfn_stacks_factory.delete_all_stacks()
else:
logging.warning("Skipping deletion of CFN stacks because --no-delete option is set")
cfn_stacks_factory.delete_stack(stack.name, region)


@pytest.fixture()
Expand Down

0 comments on commit 3da6e56

Please sign in to comment.