@@ -92,30 +92,30 @@ func TestAccOrganizationResource(t *testing.T) {
92
92
statecheck .ExpectKnownValue ("coderd_organization.test" , tfjsonpath .New ("display_name" ), knownvalue .StringExact ("Example Organization New" )),
93
93
},
94
94
},
95
- // Add group and role sync
95
+ // Add org sync
96
96
{
97
97
Config : cfg3 .String (t ),
98
98
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" )),
103
101
},
104
102
},
105
- // Add org sync
103
+ // Patch org sync
106
104
{
107
105
Config : cfg4 .String (t ),
108
106
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 " )),
111
109
},
112
110
},
113
- // Patch org sync
111
+ // Add group and role sync
114
112
{
115
113
Config : cfg5 .String (t ),
116
114
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" )),
119
119
},
120
120
},
121
121
},
0 commit comments