Skip to content

fix 645: set tags in resourceNetboxTenantRead#646

Open
sempervictus wants to merge 1 commit intoe-breuninger:masterfrom
sempervictus:bug/tenant_resource_tags_unset
Open

fix 645: set tags in resourceNetboxTenantRead#646
sempervictus wants to merge 1 commit intoe-breuninger:masterfrom
sempervictus:bug/tenant_resource_tags_unset

Conversation

@sempervictus
Copy link

address #645

@sempervictus
Copy link
Author

These tests are ... "illogical":

=== NAME  TestAccNetboxTenant_tags
    resource_netbox_tenant_test.go:81: Step 1/3 error: After applying this test step and performing a `terraform refresh`, 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:
        
          # netbox_tenant.test_tags will be updated in-place
          ~ resource "netbox_tenant" "test_tags" {
                id          = "69"
                name        = "test-tenant_tags-gjusrf4zcd"
              ~ tags        = [
                  + "test-tenant_tags-gjusrf4zcda",
                ]
                # (2 unchanged attributes hidden)
            }
        
        Plan: 0 to add, 1 to change, 0 to destroy.
--- FAIL: TestAccNetboxTenant_tags (1.88s)

is exactly what should be happening because the provider ignored the need to populate its own fields and really the tests should always fail on any data field being null since a read of an empty type would still produce that type, just with no data in it.

@sempervictus sempervictus changed the title set tags in resourceNetboxTenantRead fix 645: set tags in resourceNetboxTenantRead Oct 28, 2024
@fbreckle fbreckle force-pushed the bug/tenant_resource_tags_unset branch from dbeeeb5 to 51b1204 Compare January 9, 2025 09:58
@sempervictus
Copy link
Author

its the same failure:

=== NAME  TestAccNetboxTenant_tags
    resource_netbox_tenant_test.go:81: Step 1/3 error: After applying this test step and performing a `terraform refresh`, 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:
        
          # netbox_tenant.test_tags will be updated in-place
          ~ resource "netbox_tenant" "test_tags" {
                id          = "34"
                name        = "test-tenant_tags-3q7i1rndso"
              ~ tags        = [
                  + "test-tenant_tags-3q7i1rndsoa",
                ]
                # (2 unchanged attributes hidden)
            }
        
        Plan: 0 to add, 1 to change, 0 to destroy.
--- PASS: TestAccNetboxToken_basic (2.43s)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant