@@ -106,7 +106,9 @@ func TestTelemetry(t *testing.T) {
106
106
107
107
_ = dbgen .WorkspaceModule (t , db , database.WorkspaceModule {})
108
108
109
- _ , snapshot := collectSnapshot (t , db , nil )
109
+ deployment , snapshot := collectSnapshot (t , db , nil )
110
+ require .False (t , deployment .IDPOrgSync )
111
+
110
112
require .Len (t , snapshot .ProvisionerJobs , 1 )
111
113
require .Len (t , snapshot .Licenses , 1 )
112
114
require .Len (t , snapshot .Templates , 1 )
@@ -153,6 +155,15 @@ func TestTelemetry(t *testing.T) {
153
155
for _ , entity := range snapshot .Templates {
154
156
require .Equal (t , entity .OrganizationID , org .ID )
155
157
}
158
+
159
+ deployment2 , _ := collectSnapshot (t , db , func (opts telemetry.Options ) telemetry.Options {
160
+ opts .OrganizationSyncEnabled = new (func () bool )
161
+ * opts .OrganizationSyncEnabled = func () bool {
162
+ return true
163
+ }
164
+ return opts
165
+ })
166
+ require .True (t , deployment2 .IDPOrgSync )
156
167
})
157
168
t .Run ("HashedEmail" , func (t * testing.T ) {
158
169
t .Parallel ()
0 commit comments