hashicorp / terraform-provider-helm

Terraform Helm provider
https://www.terraform.io/docs/providers/helm/
Mozilla Public License 2.0
1.01k stars 371 forks source link

Supress empty description test #1521

Open JaylonmcShan03 opened 3 weeks ago

JaylonmcShan03 commented 3 weeks ago

Description

This pr adds a test for the suppress empty description logic we have in place for the Description attribute

When running the test, I am getting an weird error where after applying the first step, terraform still detects a change, which with my understanding means the suppression logic isn't taking affect as intended. I am not sure what the hiccup is, because after review the logic it looks perfectly fine to me! Can I get a second pair of eyes on this, there could be something I am not thinking of!

Logs from the test >

`st_name=TestAccResourceRelease_suppressEmptyDescription test_terraform_path=/opt/homebrew/bin/terraform
  error=
  | After applying this test step, the non-refresh plan was not empty.
  | stdout:
  | 
  | 
  | Terraform used the selected providers to generate the following execution
  | plan. Resource actions are indicated with the following symbols:
  |   ~ update in-place
  | 
  | Terraform will perform the following actions:
  | 
  |   # helm_release.test will be updated in-place
  |   ~ resource "helm_release" "test" {
  |       ~ id                         = "suppress-empty-zbqhn4f818" -> (known after apply)
  |       ~ metadata                   = {
  |           ~ app_version    = "1.19.5" -> (known after apply)
  |           ~ chart          = "test-chart" -> (known after apply)
  |           ~ first_deployed = 1730138553 -> (known after apply)
  |           ~ last_deployed  = 1730138566 -> (known after apply)
  |           ~ name           = "suppress-empty-zbqhn4f818" -> (known after apply)
  |           ~ namespace      = "terraform-acc-test-v08zv4w1zi" -> (known after apply)
  |           ~ revision       = 2 -> (known after apply)
  |           ~ values         = jsonencode({}) -> (known after apply)
  |           ~ version        = "1.2.3" -> (known after apply)
  |         } -> (known after apply)
  |         name                       = "suppress-empty-zbqhn4f818"
  |         # (27 unchanged attributes hidden)
  |     }
  | 
  | Plan: 0 to add, 1 to change, 0 to destroy.

    resource_helm_release_test.go:714: Step 2/2 error: After applying this test step, the non-refresh plan was not empty.
        stdout:

        Terraform used the selected providers to generate the following execution
        plan. Resource actions are indicated with the following symbols:
          ~ update in-place

        Terraform will perform the following actions:

          # helm_release.test will be updated in-place
          ~ resource "helm_release" "test" {
              ~ id                         = "suppress-empty-zbqhn4f818" -> (known after apply)
              ~ metadata                   = {
                  ~ app_version    = "1.19.5" -> (known after apply)
                  ~ chart          = "test-chart" -> (known after apply)
                  ~ first_deployed = 1730138553 -> (known after apply)
                  ~ last_deployed  = 1730138566 -> (known after apply)
                  ~ name           = "suppress-empty-zbqhn4f818" -> (known after apply)
                  ~ namespace      = "terraform-acc-test-v08zv4w1zi" -> (known after apply)
                  ~ revision       = 2 -> (known after apply)
                  ~ values         = jsonencode({}) -> (known after apply)
                  ~ version        = "1.2.3" -> (known after apply)
                } -> (known after apply)
                name                       = "suppress-empty-zbqhn4f818"
                # (27 unchanged attributes hidden)
            }

        Plan: 0 to add, 1 to change, 0 to destroy.`

Acceptance tests

Release Note

Release note for CHANGELOG:

...

References

Community Note