Skip to content

Commit 753eaa9

Browse files
committed
it WORKS!
1 parent 03bdf17 commit 753eaa9

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

internal/provider/organization_resource_test.go

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"github.com/coder/coder/v2/coderd/util/ptr"
1111
"github.com/coder/coder/v2/codersdk"
1212
"github.com/coder/terraform-provider-coderd/integration"
13-
"github.com/google/uuid"
1413
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
1514
"github.com/hashicorp/terraform-plugin-testing/knownvalue"
1615
"github.com/hashicorp/terraform-plugin-testing/statecheck"
@@ -42,12 +41,12 @@ func TestAccOrganizationResource(t *testing.T) {
4241
cfg2.DisplayName = ptr.Ref("Example Organization New")
4342

4443
cfg3 := cfg2
45-
cfg3.GroupSync = ptr.Ref(codersdk.GroupSyncSettings{
46-
Field: "wibble",
47-
Mapping: map[string][]uuid.UUID{
48-
"wibble": {uuid.MustParse("6e57187f-6543-46ab-a62c-a10065dd4314")},
49-
},
50-
})
44+
// cfg3.GroupSync = ptr.Ref(codersdk.GroupSyncSettings{
45+
// Field: "wibble",
46+
// Mapping: map[string][]uuid.UUID{
47+
// "wibble": {uuid.MustParse("6e57187f-6543-46ab-a62c-a10065dd4314")},
48+
// },
49+
// })
5150
cfg3.RoleSync = ptr.Ref(codersdk.RoleSyncSettings{
5251
Field: "wobble",
5352
Mapping: map[string][]string{
@@ -90,8 +89,10 @@ func TestAccOrganizationResource(t *testing.T) {
9089
{
9190
Config: cfg3.String(t),
9291
ConfigStateChecks: []statecheck.StateCheck{
93-
statecheck.ExpectKnownValue("coderd_organization.test", tfjsonpath.New("group_sync.field"), knownvalue.StringExact("wibble")),
94-
statecheck.ExpectKnownValue("coderd_organization.test", tfjsonpath.New("role_sync.field"), knownvalue.StringExact("wobble")),
92+
// statecheck.ExpectKnownValue("coderd_organization.test", tfjsonpath.New("group_sync").AtMapKey("field"), knownvalue.StringExact("wibble")),
93+
// statecheck.ExpectKnownValue("coderd_organization.test", tfjsonpath.New("group_sync").AtMapKey("mapping").AtMapKey("wibble").AtSliceIndex(0), knownvalue.StringExact("6e57187f-6543-46ab-a62c-a10065dd4314")),
94+
statecheck.ExpectKnownValue("coderd_organization.test", tfjsonpath.New("role_sync").AtMapKey("field"), knownvalue.StringExact("wobble")),
95+
statecheck.ExpectKnownValue("coderd_organization.test", tfjsonpath.New("role_sync").AtMapKey("mapping").AtMapKey("wobble").AtSliceIndex(0), knownvalue.StringExact("wobbly")),
9596
},
9697
},
9798
},

0 commit comments

Comments
 (0)