Skip to content

Commit f2d3e3c

Browse files
committed
feedback
1 parent 28b395a commit f2d3e3c

File tree

2 files changed

+4
-19
lines changed

2 files changed

+4
-19
lines changed

internal/provider/organization_resource.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func (r *OrganizationResource) Schema(ctx context.Context, req resource.SchemaRe
5757
},
5858
},
5959
"name": schema.StringAttribute{
60-
MarkdownDescription: "Username of the organization.",
60+
MarkdownDescription: "Name of the organization.",
6161
Required: true,
6262
Validators: []validator.String{
6363
codersdkvalidator.Name(),
@@ -67,6 +67,7 @@ func (r *OrganizationResource) Schema(ctx context.Context, req resource.SchemaRe
6767
MarkdownDescription: "Display name of the organization. Defaults to name.",
6868
Computed: true,
6969
Optional: true,
70+
Default: stringdefault.StaticString(""),
7071
Validators: []validator.String{
7172
codersdkvalidator.DisplayName(),
7273
},
@@ -224,6 +225,6 @@ func (r *OrganizationResource) Delete(ctx context.Context, req resource.DeleteRe
224225

225226
func (r *OrganizationResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) {
226227
// Terraform will eventually `Read` in the rest of the fields after we have
227-
// set the `id` attribute.
228-
resource.ImportStatePassthroughID(ctx, path.Root("id"), req, resp)
228+
// set the `name` attribute.
229+
resource.ImportStatePassthroughID(ctx, path.Root("name"), req, resp)
229230
}

internal/provider/organization_resource_test.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -75,22 +75,6 @@ func TestAccOrganizationResource(t *testing.T) {
7575
},
7676
})
7777
})
78-
79-
t.Run("CreateUnmanagedMembersOk", func(t *testing.T) {
80-
resource.Test(t, resource.TestCase{
81-
IsUnitTest: true,
82-
PreCheck: func() { testAccPreCheck(t) },
83-
ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
84-
Steps: []resource.TestStep{
85-
{
86-
Config: cfg3.String(t),
87-
Check: resource.ComposeAggregateTestCheckFunc(
88-
resource.TestCheckNoResourceAttr("coderd_organization.test", "members"),
89-
),
90-
},
91-
},
92-
})
93-
})
9478
}
9579

9680
type testAccOrganizationResourceConfig struct {

0 commit comments

Comments
 (0)