@@ -92,30 +92,30 @@ func TestAccOrganizationResource(t *testing.T) {
9292 statecheck .ExpectKnownValue ("coderd_organization.test" , tfjsonpath .New ("display_name" ), knownvalue .StringExact ("Example Organization New" )),
9393 },
9494 },
95- // Add group and role sync
95+ // Add org sync
9696 {
9797 Config : cfg3 .String (t ),
9898 ConfigStateChecks : []statecheck.StateCheck {
99- statecheck .ExpectKnownValue ("coderd_organization.test" , tfjsonpath .New ("group_sync" ).AtMapKey ("field" ), knownvalue .StringExact ("wibble" )),
100- statecheck .ExpectKnownValue ("coderd_organization.test" , tfjsonpath .New ("group_sync" ).AtMapKey ("mapping" ).AtMapKey ("wibble" ).AtSliceIndex (0 ), knownvalue .StringExact ("6e57187f-6543-46ab-a62c-a10065dd4314" )),
101- statecheck .ExpectKnownValue ("coderd_organization.test" , tfjsonpath .New ("role_sync" ).AtMapKey ("field" ), knownvalue .StringExact ("wobble" )),
102- statecheck .ExpectKnownValue ("coderd_organization.test" , tfjsonpath .New ("role_sync" ).AtMapKey ("mapping" ).AtMapKey ("wobble" ).AtSliceIndex (0 ), knownvalue .StringExact ("wobbly" )),
99+ statecheck .ExpectKnownValue ("coderd_organization.test" , tfjsonpath .New ("sync_mapping" ).AtSliceIndex (0 ), knownvalue .StringExact ("wibble" )),
100+ statecheck .ExpectKnownValue ("coderd_organization.test" , tfjsonpath .New ("sync_mapping" ).AtSliceIndex (1 ), knownvalue .StringExact ("wobble" )),
103101 },
104102 },
105- // Add org sync
103+ // Patch org sync
106104 {
107105 Config : cfg4 .String (t ),
108106 ConfigStateChecks : []statecheck.StateCheck {
109- statecheck .ExpectKnownValue ("coderd_organization.test" , tfjsonpath .New ("sync_mapping" ).AtSliceIndex (0 ), knownvalue .StringExact ("wibble " )),
110- statecheck .ExpectKnownValue ("coderd_organization.test" , tfjsonpath .New ("sync_mapping" ).AtSliceIndex (1 ), knownvalue .StringExact ("wobble " )),
107+ statecheck .ExpectKnownValue ("coderd_organization.test" , tfjsonpath .New ("sync_mapping" ).AtSliceIndex (0 ), knownvalue .StringExact ("wibbley " )),
108+ statecheck .ExpectKnownValue ("coderd_organization.test" , tfjsonpath .New ("sync_mapping" ).AtSliceIndex (1 ), knownvalue .StringExact ("wobbley " )),
111109 },
112110 },
113- // Patch org sync
111+ // Add group and role sync
114112 {
115113 Config : cfg5 .String (t ),
116114 ConfigStateChecks : []statecheck.StateCheck {
117- statecheck .ExpectKnownValue ("coderd_organization.test" , tfjsonpath .New ("sync_mapping" ).AtSliceIndex (0 ), knownvalue .StringExact ("wibbley" )),
118- statecheck .ExpectKnownValue ("coderd_organization.test" , tfjsonpath .New ("sync_mapping" ).AtSliceIndex (1 ), knownvalue .StringExact ("wobbley" )),
115+ statecheck .ExpectKnownValue ("coderd_organization.test" , tfjsonpath .New ("group_sync" ).AtMapKey ("field" ), knownvalue .StringExact ("wibble" )),
116+ statecheck .ExpectKnownValue ("coderd_organization.test" , tfjsonpath .New ("group_sync" ).AtMapKey ("mapping" ).AtMapKey ("wibble" ).AtSliceIndex (0 ), knownvalue .StringExact ("6e57187f-6543-46ab-a62c-a10065dd4314" )),
117+ statecheck .ExpectKnownValue ("coderd_organization.test" , tfjsonpath .New ("role_sync" ).AtMapKey ("field" ), knownvalue .StringExact ("wobble" )),
118+ statecheck .ExpectKnownValue ("coderd_organization.test" , tfjsonpath .New ("role_sync" ).AtMapKey ("mapping" ).AtMapKey ("wobble" ).AtSliceIndex (0 ), knownvalue .StringExact ("wobbly" )),
119119 },
120120 },
121121 },
0 commit comments