From aab4453915d2a031640b2755ce8bcf64a5ad209b Mon Sep 17 00:00:00 2001 From: Chris Kim Date: Tue, 19 Nov 2024 10:22:15 +1300 Subject: [PATCH] Update docs and test --- docs/data-sources/tenants.md | 2 +- docs/resources/tenant.md | 2 +- octopusdeploy_framework/resource_tenant_migration_test.go | 7 +++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/data-sources/tenants.md b/docs/data-sources/tenants.md index 438682077..c95b3b896 100644 --- a/docs/data-sources/tenants.md +++ b/docs/data-sources/tenants.md @@ -43,6 +43,6 @@ Read-Only: - `id` (String) The unique ID for this resource. - `name` (String) The name of this resource. - `space_id` (String) The space ID associated with this tenant. -- `tenant_tags` (List of String) A list of tenant tags associated with this resource. +- `tenant_tags` (Set of String) A list of tenant tags associated with this resource. diff --git a/docs/resources/tenant.md b/docs/resources/tenant.md index 0a62ebe36..02fb8feb7 100644 --- a/docs/resources/tenant.md +++ b/docs/resources/tenant.md @@ -21,7 +21,7 @@ This resource manages tenants in Octopus Deploy. - `cloned_from_tenant_id` (String) The ID of the tenant from which this tenant was cloned. - `description` (String) The description of this tenant. - `space_id` (String) The space ID associated with this tenant. -- `tenant_tags` (List of String) A list of tenant tags associated with this resource. +- `tenant_tags` (Set of String) A list of tenant tags associated with this resource. ### Read-Only diff --git a/octopusdeploy_framework/resource_tenant_migration_test.go b/octopusdeploy_framework/resource_tenant_migration_test.go index 0ca7404e7..441e70079 100644 --- a/octopusdeploy_framework/resource_tenant_migration_test.go +++ b/octopusdeploy_framework/resource_tenant_migration_test.go @@ -2,14 +2,14 @@ package octopusdeploy_framework import ( "fmt" + "os" + "testing" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/plancheck" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/stretchr/testify/assert" - "os" - "sort" - "testing" ) func TestTenantResource_UpgradeFromSDK_ToPluginFramework(t *testing.T) { @@ -95,7 +95,6 @@ func testTenantResourceUpdated(t *testing.T, name string) resource.TestCheckFunc if err != nil { return fmt.Errorf("failed to retrieve tenant by ID: %s", err) } - sort.Strings(tenant.TenantTags) assert.NotEmpty(t, "Tenant ID did not match expected value", tenant.ID) assert.Equal(t, fmt.Sprintf("Updated description"), tenant.Description)