@@ -10,6 +10,7 @@ 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"
1314 "github.com/hashicorp/terraform-plugin-testing/helper/resource"
1415 "github.com/hashicorp/terraform-plugin-testing/knownvalue"
1516 "github.com/hashicorp/terraform-plugin-testing/statecheck"
@@ -41,12 +42,12 @@ func TestAccOrganizationResource(t *testing.T) {
4142 cfg2 .DisplayName = ptr .Ref ("Example Organization New" )
4243
4344 cfg3 := cfg2
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- // })
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+ })
5051 cfg3 .RoleSync = ptr .Ref (codersdk.RoleSyncSettings {
5152 Field : "wobble" ,
5253 Mapping : map [string ][]string {
@@ -89,8 +90,8 @@ func TestAccOrganizationResource(t *testing.T) {
8990 {
9091 Config : cfg3 .String (t ),
9192 ConfigStateChecks : []statecheck.StateCheck {
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")),
93+ statecheck .ExpectKnownValue ("coderd_organization.test" , tfjsonpath .New ("group_sync" ).AtMapKey ("field" ), knownvalue .StringExact ("wibble" )),
94+ statecheck .ExpectKnownValue ("coderd_organization.test" , tfjsonpath .New ("group_sync" ).AtMapKey ("mapping" ).AtMapKey ("wibble" ).AtSliceIndex (0 ), knownvalue .StringExact ("6e57187f-6543-46ab-a62c-a10065dd4314" )),
9495 statecheck .ExpectKnownValue ("coderd_organization.test" , tfjsonpath .New ("role_sync" ).AtMapKey ("field" ), knownvalue .StringExact ("wobble" )),
9596 statecheck .ExpectKnownValue ("coderd_organization.test" , tfjsonpath .New ("role_sync" ).AtMapKey ("mapping" ).AtMapKey ("wobble" ).AtSliceIndex (0 ), knownvalue .StringExact ("wobbly" )),
9697 },
0 commit comments