@@ -10,6 +10,7 @@ import (
10
10
"github.com/coder/coder/v2/coderd/util/ptr"
11
11
"github.com/coder/coder/v2/codersdk"
12
12
"github.com/coder/terraform-provider-coderd/integration"
13
+ "github.com/google/uuid"
13
14
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
14
15
"github.com/hashicorp/terraform-plugin-testing/knownvalue"
15
16
"github.com/hashicorp/terraform-plugin-testing/statecheck"
@@ -41,12 +42,12 @@ func TestAccOrganizationResource(t *testing.T) {
41
42
cfg2 .DisplayName = ptr .Ref ("Example Organization New" )
42
43
43
44
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
+ })
50
51
cfg3 .RoleSync = ptr .Ref (codersdk.RoleSyncSettings {
51
52
Field : "wobble" ,
52
53
Mapping : map [string ][]string {
@@ -89,8 +90,8 @@ func TestAccOrganizationResource(t *testing.T) {
89
90
{
90
91
Config : cfg3 .String (t ),
91
92
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" )),
94
95
statecheck .ExpectKnownValue ("coderd_organization.test" , tfjsonpath .New ("role_sync" ).AtMapKey ("field" ), knownvalue .StringExact ("wobble" )),
95
96
statecheck .ExpectKnownValue ("coderd_organization.test" , tfjsonpath .New ("role_sync" ).AtMapKey ("mapping" ).AtMapKey ("wobble" ).AtSliceIndex (0 ), knownvalue .StringExact ("wobbly" )),
96
97
},
0 commit comments