Skip to content

Ability to test whether warnings are raised during test steps #16

Closed as not planned
@bendbennett

Description

@bendbennett

This issue is a duplicate of Ability to test whether warnings are raised during test steps.

Version

N/A

Use-cases

Currently, ExpectError field only allows checking errors, not warnings. This makes provider developers hard to test certain scenarios where warnings are expected and want to validate the exact behavior in tests.

Attempted Solutions

N/A

Proposal

Add an ExpectWarning field to TestStep and use json output from terraform commands to determine whether warnings have been generated during execution of a test step.

Requires changes to terraform-exec to add support for executing terraform commands with -json option (see References below for links to relevant issue and PRs on terraform-exec repository.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions