Skip to content

Proposal: Add context-aware variants of functions in resource.TestCase #88

Open
@gdavison

Description

@gdavison

Use cases

In some cases, TestCheckFuncs, ErrorCheckFuncs, etc., may need to log. Without access to a context, they won't have access to a tflog.

Providers can recreate their own test logger (e.g. hashicorp/terraform-provider-aws#29764), but don't have access to the test_step_number and other logging fields.

Attempted solutions

Implemented our own with only the test_name field in hashicorp/terraform-provider-aws#29764

Proposal

Add context-aware versions of functions passed to resource.TestCase so that the logging context supplied by the testing framework can be passed

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