@@ -19,6 +19,7 @@ import (
19
19
"github.com/coder/coder/v2/coderd/entitlements"
20
20
"github.com/coder/coder/v2/coderd/idpsync"
21
21
"github.com/coder/coder/v2/coderd/rbac"
22
+ "github.com/coder/coder/v2/coderd/runtimeconfig"
22
23
"github.com/coder/coder/v2/codersdk"
23
24
"github.com/coder/coder/v2/enterprise/coderd/enidpsync"
24
25
"github.com/coder/coder/v2/testutil"
@@ -41,7 +42,7 @@ type Expectations struct {
41
42
}
42
43
43
44
type OrganizationSyncTestCase struct {
44
- Settings idpsync.SyncSettings
45
+ Settings idpsync.DeploymentSyncSettings
45
46
Entitlements * entitlements.Set
46
47
Exps []Expectations
47
48
}
@@ -89,7 +90,7 @@ func TestOrganizationSync(t *testing.T) {
89
90
other := dbgen .Organization (t , db , database.Organization {})
90
91
return OrganizationSyncTestCase {
91
92
Entitlements : entitled ,
92
- Settings : idpsync.SyncSettings {
93
+ Settings : idpsync.DeploymentSyncSettings {
93
94
OrganizationField : "" ,
94
95
OrganizationMapping : nil ,
95
96
OrganizationAssignDefault : true ,
@@ -142,7 +143,7 @@ func TestOrganizationSync(t *testing.T) {
142
143
three := dbgen .Organization (t , db , database.Organization {})
143
144
return OrganizationSyncTestCase {
144
145
Entitlements : entitled ,
145
- Settings : idpsync.SyncSettings {
146
+ Settings : idpsync.DeploymentSyncSettings {
146
147
OrganizationField : "organizations" ,
147
148
OrganizationMapping : map [string ][]uuid.UUID {
148
149
"first" : {one .ID },
@@ -236,7 +237,7 @@ func TestOrganizationSync(t *testing.T) {
236
237
}
237
238
238
239
// Create a new sync object
239
- sync := enidpsync .NewSync (logger , caseData .Entitlements , caseData .Settings )
240
+ sync := enidpsync .NewSync (logger , runtimeconfig . NewStoreManager ( rdb ), caseData .Entitlements , caseData .Settings )
240
241
for _ , exp := range caseData .Exps {
241
242
t .Run (exp .Name , func (t * testing.T ) {
242
243
params , httpErr := sync .ParseOrganizationClaims (ctx , exp .Claims )
0 commit comments