How to use test_deleted_changeset method in localstack

Best Python code snippet using localstack_python

test_cloudformation_changesets.py

Source:test_cloudformation_changesets.py Github

copy

Full Screen

...440 with pytest.raises(cfn_client.exceptions.InvalidChangeSetStatusException) as e:441 cfn_client.execute_change_set(StackName=stack_name, ChangeSetName=nochange_changeset["Id"])442 snapshot.match("error_execute_failed", e.value)443@pytest.mark.aws_validated444def test_deleted_changeset(cfn_client, snapshot, cleanups):445 """simple case verifying that proper exception is thrown when trying to get a deleted changeset"""446 snapshot.add_transformer(snapshot.transform.cloudformation_api())447 changeset_name = f"changeset-{short_uid()}"448 stack_name = f"stack-{short_uid()}"449 cleanups.append(lambda: cfn_client.delete_stack(StackName=stack_name))450 snapshot.add_transformer(snapshot.transform.regex(stack_name, "<stack-name>"))451 template_path = os.path.join(os.path.dirname(__file__), "../templates/cdkmetadata.yaml")452 template = load_template_file(template_path)453 # 1. create change set454 create = cfn_client.create_change_set(455 ChangeSetName=changeset_name,456 StackName=stack_name,457 TemplateBody=template,458 Capabilities=["CAPABILITY_AUTO_EXPAND", "CAPABILITY_IAM", "CAPABILITY_NAMED_IAM"],...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run localstack automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful