spacelift-io / terraform-provider-spacelift

Terraform provider to interact with Spacelift
MIT License
76 stars 29 forks source link

Extend VCS tests #519

Closed truszkowski closed 8 months ago

truszkowski commented 8 months ago

Description of the change

Let's test more VCS integrations! Setting up ID, changing and mixing different (source code) providers.

If we had those tests, adding azure_devops.0.id (+ other VCSes) without DiffSuppressFunc/Computed would be ended with:

=== NAME  TestVCSIntegration/spacelift_stack/setting_up_ID/azure-devops-with-non-specified-integration-gdu23
    test_provider.go:30: Step 1/2 error: After applying this test step, the 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:

          # spacelift_stack.test will be updated in-place
          ~ resource "spacelift_stack" "test" {
                id                               = "azure-devops-with-non-specified-integration-gdu23"
                name                             = "azure-devops-with-non-specified-integration-gdu23"
                # (15 unchanged attributes hidden)

              ~ azure_devops {
                  - id         = "azure-devops-default" -> null
                    # (2 unchanged attributes hidden)
                }
            }

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

Also, if we replace DiffSuppressFunc with Computed, it works!

Type of change

Related issues

Fix [#1]()

Checklists

Development

Code review