@@ -105,13 +105,13 @@ func (d *Deployment) Register(t ct.TestLike, hsName string, opts helpers.Registr
105105 ct .Fatalf (t , "Deployment.Register - HS name '%s' not found" , hsName )
106106 return nil
107107 }
108- client := & client.CSAPI {
108+ client := client .NewCSAPI (client. CSAPIOpts {
109109 BaseURL : dep .BaseURL ,
110110 Client : client .NewLoggedClient (t , hsName , nil ),
111111 SyncUntilTimeout : 5 * time .Second ,
112112 Debug : d .Deployer .debugLogging ,
113113 Password : opts .Password ,
114- }
114+ })
115115 // Appending a slice is not thread-safe. Protect the write with a mutex.
116116 dep .CSAPIClientsMutex .Lock ()
117117 dep .CSAPIClients = append (dep .CSAPIClients , client )
@@ -155,13 +155,13 @@ func (d *Deployment) Login(t ct.TestLike, hsName string, existing *client.CSAPI,
155155 if err != nil {
156156 ct .Fatalf (t , "Deployment.Login: existing CSAPI client has invalid user ID '%s', cannot login as this user: %s" , existing .UserID , err )
157157 }
158- c := & client.CSAPI {
158+ c := client .NewCSAPI (client. CSAPIOpts {
159159 BaseURL : dep .BaseURL ,
160160 Client : client .NewLoggedClient (t , hsName , nil ),
161161 SyncUntilTimeout : 5 * time .Second ,
162162 Debug : d .Deployer .debugLogging ,
163163 Password : existing .Password ,
164- }
164+ })
165165 if opts .Password != "" {
166166 c .Password = opts .Password
167167 }
@@ -197,12 +197,12 @@ func (d *Deployment) UnauthenticatedClient(t ct.TestLike, hsName string) *client
197197 ct .Fatalf (t , "Deployment.Client - HS name '%s' not found" , hsName )
198198 return nil
199199 }
200- client := & client.CSAPI {
200+ client := client .NewCSAPI (client. CSAPIOpts {
201201 BaseURL : dep .BaseURL ,
202202 Client : client .NewLoggedClient (t , hsName , nil ),
203203 SyncUntilTimeout : 5 * time .Second ,
204204 Debug : d .Deployer .debugLogging ,
205- }
205+ })
206206 // Appending a slice is not thread-safe. Protect the write with a mutex.
207207 dep .CSAPIClientsMutex .Lock ()
208208 dep .CSAPIClients = append (dep .CSAPIClients , client )
@@ -230,15 +230,15 @@ func (d *Deployment) AppServiceUser(t ct.TestLike, hsName, appServiceUserID stri
230230 if deviceID == "" && appServiceUserID != "" {
231231 t .Logf ("WARNING: Deployment.Client - HS name '%s' - user ID '%s' - deviceID not found" , hsName , appServiceUserID )
232232 }
233- client := & client.CSAPI {
233+ client := client .NewCSAPI (client. CSAPIOpts {
234234 UserID : appServiceUserID ,
235235 AccessToken : token ,
236236 DeviceID : deviceID ,
237237 BaseURL : dep .BaseURL ,
238238 Client : client .NewLoggedClient (t , hsName , nil ),
239239 SyncUntilTimeout : 5 * time .Second ,
240240 Debug : d .Deployer .debugLogging ,
241- }
241+ })
242242 // Appending a slice is not thread-safe. Protect the write with a mutex.
243243 dep .CSAPIClientsMutex .Lock ()
244244 dep .CSAPIClients = append (dep .CSAPIClients , client )
0 commit comments