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

tfsdklog: Consolidated multiple invalid log level messages and added missing newline #35

Merged
merged 2 commits into from
Mar 8, 2022

Commits on Mar 4, 2022

  1. tfsdklog: Consolidated multiple invalid log level messages and added …

    …missing newline
    
    Reference: #32
    
    This is related to SDK (or special implementations of testing framework) code which needs to execute `tfsdklog.RegisterTestSink()`, generally via the `tf5server.WithLoggingSink()`/`tf6server.WithLoggingSink()` functions.
    
    Previously in terraform-provider-kubernetes:
    
    ```console
    $ TF_LOG=trac go test -v -tags acceptance -run '^TestKubernetesManifest_ConfigMap$' ./manifest/test/acceptance
    2022/03/04 16:51:21 Testing against Kubernetes API version: v1.22.3
    === RUN   TestKubernetesManifest_ConfigMap
    [WARN] Invalid log level: "TRAC". Defaulting to level: OFF. Valid levels are: [TRACE DEBUG INFO WARN ERROR OFF][WARN] Invalid log level: "TRAC". Defaulting to level: OFF. Valid levels are: [TRACE DEBUG INFO WARN ERROR OFF][WARN] Invalid log level: "TRAC". Defaulting to level: OFF. Valid levels are: [TRACE DEBUG INFO WARN ERROR OFF][WARN] Invalid log level: "TRAC". Defaulting to level: OFF. Valid levels are: [TRACE DEBUG INFO WARN ERROR OFF][WARN] Invalid log level: "TRAC". Defaulting to level: OFF. Valid levels are: [TRACE DEBUG INFO WARN ERROR OFF][WARN] Invalid log level: "TRAC". Defaulting to level: OFF. Valid levels are: [TRACE DEBUG INFO WARN ERROR OFF]...
    ```
    
    After updating dependency:
    
    ```console
    $ go mod edit -replace=github.com/hashicorp/terraform-plugin-log=/Users/bflad/src/github.com/hashicorp/terraform-plugin-log
    $ go mod tidy
    $ go mod vendor
    $ TF_LOG=trac go test -v -tags acceptance -run '^TestKubernetesManifest_ConfigMap$' ./manifest/test/acceptance
    2022/03/04 16:52:49 Testing against Kubernetes API version: v1.22.3
    === RUN   TestKubernetesManifest_ConfigMap
    [WARN] Invalid log level: "TRAC". Defaulting to level: OFF. Valid levels are: [TRACE DEBUG INFO WARN ERROR OFF]
    ... other test output ...
    ```
    bflad committed Mar 4, 2022
    Configuration menu
    Copy the full SHA
    fda4728 View commit details
    Browse the repository at this point in the history
  2. Update CHANGELOG for #35

    bflad committed Mar 4, 2022
    Configuration menu
    Copy the full SHA
    6df0890 View commit details
    Browse the repository at this point in the history