Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

helper/resource: Add Terraform configuration to TRACE logging #1059

Merged
merged 3 commits into from Sep 14, 2022

Conversation

bflad
Copy link
Member

@bflad bflad commented Sep 14, 2022

Closes #700

For example:

$ TF_ACC=1 TF_LOG=TRACE go test -count=1 -run='TestTest_TestStep_ExternalProviders_DifferentVersions' -v ./helper/resource
...
2022-09-13T22:40:05.009-0400 [TRACE] sdk.helper_resource: Setting Terraform configuration: test_name=TestTest_TestStep_ExternalProviders_DifferentVersions test_step_number=1 test_terraform_path=/opt/homebrew/bin/terraform test_working_directory=/var/folders/f3/2mhr8hkx72z9dllv0ry81zm40000gq/T/plugintest971555752
  test_terraform_config=
  |
  | terraform {
  |   required_providers {
  |     null = {
  |       source = "registry.terraform.io/hashicorp/null"
  |       version = "3.1.0"
  |     }
  |   }
  | }
  |
  | provider "null" {}
  |
...

Reference: #700

For example:

```console
$ TF_ACC=1 TF_LOG=TRACE go test -count=1 -run='TestTest_TestStep_ExternalProviders_DifferentVersions' -v ./helper/resource
...
2022-09-13T22:40:05.009-0400 [TRACE] sdk.helper_resource: Setting Terraform configuration: test_name=TestTest_TestStep_ExternalProviders_DifferentVersions test_step_number=1 test_terraform_path=/opt/homebrew/bin/terraform test_working_directory=/var/folders/f3/2mhr8hkx72z9dllv0ry81zm40000gq/T/plugintest971555752
  test_terraform_config=
  |
  | terraform {
  |   required_providers {
  |     null = {
  |       source = "registry.terraform.io/hashicorp/null"
  |       version = "3.1.0"
  |     }
  |   }
  | }
  |
  | provider "null" {}
  |
...
```
@bflad bflad added enhancement New feature or request subsystem/tests Issues and feature requests related to the testing framework. labels Sep 14, 2022
@bflad bflad added this to the v2.23.0 milestone Sep 14, 2022
@bflad bflad requested a review from a team as a code owner September 14, 2022 02:47
Copy link
Contributor

@bendbennett bendbennett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bflad bflad merged commit 755f211 into main Sep 14, 2022
5 checks passed
@bflad bflad deleted the bflad/testing-framework-log-config branch September 14, 2022 13:23
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days . This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request subsystem/tests Issues and feature requests related to the testing framework.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Output of Finalized Test Configurations During Acceptance Testing
2 participants