Index
taskcat.testing
¶
CFNTest(config, printer=None, test_names='ALL', regions='ALL', skip_upload=False, lint_disable=False, no_delete=False, keep_failed=False, dont_wait_for_delete=True, _extra_tags=None)
¶
Bases: BaseTest
Tests Cloudformation template by making sure the stack can properly deploy in the specified regions.
The constructor creates a test from the given Config object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config
|
Config
|
A pre-configured Taskcat Config instance. |
required |
printer
|
Union[TerminalPrinter, None]
|
A printer object that will handle Test output. Defaults to TerminalPrinter. |
None
|
test_names
|
str
|
A comma separated list of tests to run. Defaults to "ALL". |
'ALL'
|
regions
|
str
|
A comma separated list of regions to test in. Defaults to "ALL". |
'ALL'
|
skip_upload
|
bool
|
Use templates in an existing cloudformation bucket. Defaults to False. |
False
|
lint_disable
|
bool
|
Disable linting with cfn-lint. Defaults to False. |
False
|
no_delete
|
bool
|
Don't delete stacks after test is complete. Defaults to False. |
False
|
keep_failed
|
bool
|
Don't delete failed stacks. Defaults to False. |
False
|
dont_wait_for_delete
|
bool
|
Exits immediately after calling stack_delete. Defaults to True. |
True
|
Source code in taskcat/testing/_cfn_test.py
clean_up()
¶
Deletes the Test related resources in AWS.
Raises:
Type | Description |
---|---|
TaskCatException
|
If one or more stacks failed to create. |
Source code in taskcat/testing/_cfn_test.py
report(output_directory='./taskcat_outputs')
¶
Generates a report of the status of Cloudformation stacks.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
output_directory
|
str
|
The directory to save the report in. Defaults to "./taskcat_outputs". |
'./taskcat_outputs'
|
Source code in taskcat/testing/_cfn_test.py
run()
¶
Deploys the required Test resources in AWS.
Raises:
Type | Description |
---|---|
TaskCatException
|
If skip_upload is set without specifying s3_bucket in config. |
TaskCatException
|
If linting fails with errors. |