diff --git a/internal/provider/namespace_resource.go b/internal/provider/namespace_resource.go index f528e42..6954da1 100644 --- a/internal/provider/namespace_resource.go +++ b/internal/provider/namespace_resource.go @@ -32,11 +32,8 @@ import ( "github.com/hashicorp/terraform-plugin-framework/diag" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" -<<<<<<< HEAD - "github.com/hashicorp/terraform-plugin-framework/resource/schema/listplanmodifier" -======= "github.com/hashicorp/terraform-plugin-framework/resource/schema/booldefault" ->>>>>>> main + "github.com/hashicorp/terraform-plugin-framework/resource/schema/listplanmodifier" "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" "github.com/hashicorp/terraform-plugin-framework/types" diff --git a/internal/provider/namespace_resource_test.go b/internal/provider/namespace_resource_test.go index dfa0ded..1774fc1 100644 --- a/internal/provider/namespace_resource_test.go +++ b/internal/provider/namespace_resource_test.go @@ -124,14 +124,6 @@ PEM }) } -<<<<<<< HEAD -func TestAccNamespaceRenameForcesReplacement(t *testing.T) { - t.Parallel() - oldName := fmt.Sprintf("%s-%s", "tf-rename-replace", randomString(10)) - newName := fmt.Sprintf("%s-%s", "tf-rename-replace-new", randomString(10)) - config := func(name string) string { - return fmt.Sprintf(` -======= func TestAccNamespaceWithCodecServer(t *testing.T) { type ( codecServer struct { @@ -150,17 +142,12 @@ func TestAccNamespaceWithCodecServer(t *testing.T) { t.Parallel() name := fmt.Sprintf("%s-%s", "tf-codec-server", randomString(10)) tmpl := template.Must(template.New("config").Parse(` ->>>>>>> main provider "temporalcloud" { } resource "temporalcloud_namespace" "test" { -<<<<<<< HEAD - name = "%s" -======= name = "{{ .Name }}" ->>>>>>> main regions = ["aws-us-east-1"] accepted_client_ca = base64encode(<>>>>>> main } resource.Test(t, resource.TestCase{ @@ -212,15 +193,6 @@ PEM ProtoV6ProviderFactories: testAccProtoV6ProviderFactories, Steps: []resource.TestStep{ { -<<<<<<< HEAD - Config: config(oldName), - }, - { - Config: config(newName), - }, - }, - }) -======= Config: config(configArgs{ Name: name, RetentionDays: 7, @@ -284,7 +256,51 @@ PEM // Delete testing automatically occurs in TestCase }, }) +} +func TestAccNamespaceRenameForcesReplacement(t *testing.T) { + t.Parallel() + oldName := fmt.Sprintf("%s-%s", "tf-rename-replace", randomString(10)) + newName := fmt.Sprintf("%s-%s", "tf-rename-replace-new", randomString(10)) + config := func(name string) string { + return fmt.Sprintf(` +provider "temporalcloud" { +} +resource "temporalcloud_namespace" "test" { + name = "%s" + regions = ["aws-us-east-1"] + accepted_client_ca = base64encode(<>>>>>> main } func randomString(length int) string {