@@ -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