Skip to content

Commit 0d818c1

Browse files
author
Devansh Thakur
committed
use snake case for variables
1 parent 40841d8 commit 0d818c1

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

services/intake/wait/wait_test.go

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ func (a *apiClientMocked) GetIntakeUserExecute(_ context.Context, _, _, _, _ str
6464
}
6565

6666
var (
67-
projectId = uuid.NewString()
68-
REGION = "eu01"
69-
INTAKE_RUNNER_ID = uuid.NewString()
70-
INTAKE_ID = uuid.NewString()
71-
INTAKE_USER_ID = uuid.NewString()
67+
projectId = uuid.NewString()
68+
region = "eu01"
69+
intakeRunnerId = uuid.NewString()
70+
intakeId = uuid.NewString()
71+
intakeUserId = uuid.NewString()
7272
)
7373

7474
func TestCreateOrUpdateIntakeRunnerWaitHandler(t *testing.T) {
@@ -88,7 +88,7 @@ func TestCreateOrUpdateIntakeRunnerWaitHandler(t *testing.T) {
8888
wantResp: true,
8989
returnRunner: true,
9090
intakeRunnerResponse: &intake.IntakeRunnerResponse{
91-
Id: utils.Ptr(INTAKE_RUNNER_ID),
91+
Id: utils.Ptr(intakeRunnerId),
9292
State: utils.Ptr(intake.INTAKERUNNERRESPONSESTATE_ACTIVE),
9393
},
9494
},
@@ -107,7 +107,7 @@ func TestCreateOrUpdateIntakeRunnerWaitHandler(t *testing.T) {
107107
wantResp: false,
108108
returnRunner: true,
109109
intakeRunnerResponse: &intake.IntakeRunnerResponse{
110-
Id: utils.Ptr(INTAKE_RUNNER_ID),
110+
Id: utils.Ptr(intakeRunnerId),
111111
State: utils.Ptr(intake.INTAKERUNNERRESPONSESTATE_RECONCILING),
112112
},
113113
},
@@ -135,7 +135,7 @@ func TestCreateOrUpdateIntakeRunnerWaitHandler(t *testing.T) {
135135
wantResp: false,
136136
returnRunner: true,
137137
intakeRunnerResponse: &intake.IntakeRunnerResponse{
138-
Id: utils.Ptr(INTAKE_RUNNER_ID),
138+
Id: utils.Ptr(intakeRunnerId),
139139
},
140140
},
141141
}
@@ -153,7 +153,7 @@ func TestCreateOrUpdateIntakeRunnerWaitHandler(t *testing.T) {
153153
wantResp = tt.intakeRunnerResponse
154154
}
155155

156-
handler := CreateOrUpdateIntakeRunnerWaitHandler(context.Background(), apiClient, PROJECT_ID, REGION, INTAKE_RUNNER_ID)
156+
handler := CreateOrUpdateIntakeRunnerWaitHandler(context.Background(), apiClient, projectId, region, intakeRunnerId)
157157
got, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background())
158158

159159
if (err != nil) != tt.wantErr {
@@ -202,10 +202,10 @@ func TestDeleteIntakeRunnerWaitHandler(t *testing.T) {
202202
getErrorCode: tt.getErrorCode,
203203
returnRunner: tt.returnRunner,
204204
intakeRunnerResponse: &intake.IntakeRunnerResponse{ // This is only used in the timeout case
205-
Id: utils.Ptr(INTAKE_RUNNER_ID),
205+
Id: utils.Ptr(intakeRunnerId),
206206
},
207207
}
208-
handler := DeleteIntakeRunnerWaitHandler(context.Background(), apiClient, PROJECT_ID, REGION, INTAKE_RUNNER_ID)
208+
handler := DeleteIntakeRunnerWaitHandler(context.Background(), apiClient, projectId, region, intakeRunnerId)
209209
_, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background())
210210

211211
if (err != nil) != tt.wantErr {
@@ -232,7 +232,7 @@ func TestCreateOrUpdateIntakeWaitHandler(t *testing.T) {
232232
wantResp: true,
233233
returnIntake: true,
234234
intakeResponse: &intake.IntakeResponse{
235-
Id: utils.Ptr(INTAKE_ID),
235+
Id: utils.Ptr(intakeId),
236236
State: utils.Ptr(intake.INTAKERESPONSESTATE_ACTIVE),
237237
},
238238
},
@@ -243,7 +243,7 @@ func TestCreateOrUpdateIntakeWaitHandler(t *testing.T) {
243243
wantResp: true,
244244
returnIntake: true,
245245
intakeResponse: &intake.IntakeResponse{
246-
Id: utils.Ptr(INTAKE_ID),
246+
Id: utils.Ptr(intakeId),
247247
State: utils.Ptr(intake.INTAKERESPONSESTATE_FAILED),
248248
},
249249
},
@@ -262,7 +262,7 @@ func TestCreateOrUpdateIntakeWaitHandler(t *testing.T) {
262262
wantResp: false,
263263
returnIntake: true,
264264
intakeResponse: &intake.IntakeResponse{
265-
Id: utils.Ptr(INTAKE_ID),
265+
Id: utils.Ptr(intakeId),
266266
State: utils.Ptr(intake.INTAKERESPONSESTATE_RECONCILING),
267267
},
268268
},
@@ -290,7 +290,7 @@ func TestCreateOrUpdateIntakeWaitHandler(t *testing.T) {
290290
wantResp: false,
291291
returnIntake: true,
292292
intakeResponse: &intake.IntakeResponse{
293-
Id: utils.Ptr(INTAKE_ID),
293+
Id: utils.Ptr(intakeId),
294294
},
295295
},
296296
}
@@ -308,7 +308,7 @@ func TestCreateOrUpdateIntakeWaitHandler(t *testing.T) {
308308
wantResp = tt.intakeResponse
309309
}
310310

311-
handler := CreateOrUpdateIntakeWaitHandler(context.Background(), apiClient, PROJECT_ID, REGION, INTAKE_ID)
311+
handler := CreateOrUpdateIntakeWaitHandler(context.Background(), apiClient, projectId, region, intakeId)
312312
got, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background())
313313

314314
if (err != nil) != tt.wantErr {
@@ -357,10 +357,10 @@ func TestDeleteIntakeWaitHandler(t *testing.T) {
357357
getErrorCode: tt.getErrorCode,
358358
returnIntake: tt.returnIntake,
359359
intakeResponse: &intake.IntakeResponse{
360-
Id: utils.Ptr(INTAKE_ID),
360+
Id: utils.Ptr(intakeId),
361361
},
362362
}
363-
handler := DeleteIntakeWaitHandler(context.Background(), apiClient, PROJECT_ID, REGION, INTAKE_ID)
363+
handler := DeleteIntakeWaitHandler(context.Background(), apiClient, projectId, region, intakeId)
364364
_, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background())
365365

366366
if (err != nil) != tt.wantErr {
@@ -387,7 +387,7 @@ func TestCreateOrUpdateIntakeUserWaitHandler(t *testing.T) {
387387
wantResp: true,
388388
returnUser: true,
389389
intakeUserResponse: &intake.IntakeUserResponse{
390-
Id: utils.Ptr(INTAKE_USER_ID),
390+
Id: utils.Ptr(intakeUserId),
391391
State: utils.Ptr(intake.INTAKEUSERRESPONSESTATE_ACTIVE),
392392
},
393393
},
@@ -406,7 +406,7 @@ func TestCreateOrUpdateIntakeUserWaitHandler(t *testing.T) {
406406
wantResp: false,
407407
returnUser: true,
408408
intakeUserResponse: &intake.IntakeUserResponse{
409-
Id: utils.Ptr(INTAKE_USER_ID),
409+
Id: utils.Ptr(intakeUserId),
410410
State: utils.Ptr(intake.INTAKEUSERRESPONSESTATE_RECONCILING),
411411
},
412412
},
@@ -434,7 +434,7 @@ func TestCreateOrUpdateIntakeUserWaitHandler(t *testing.T) {
434434
wantResp: false,
435435
returnUser: true,
436436
intakeUserResponse: &intake.IntakeUserResponse{
437-
Id: utils.Ptr(INTAKE_USER_ID),
437+
Id: utils.Ptr(intakeUserId),
438438
},
439439
},
440440
}
@@ -452,7 +452,7 @@ func TestCreateOrUpdateIntakeUserWaitHandler(t *testing.T) {
452452
wantResp = tt.intakeUserResponse
453453
}
454454

455-
handler := CreateOrUpdateIntakeUserWaitHandler(context.Background(), apiClient, PROJECT_ID, REGION, INTAKE_ID, INTAKE_USER_ID)
455+
handler := CreateOrUpdateIntakeUserWaitHandler(context.Background(), apiClient, projectId, region, intakeId, intakeUserId)
456456
got, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background())
457457

458458
if (err != nil) != tt.wantErr {
@@ -501,10 +501,10 @@ func TestDeleteIntakeUserWaitHandler(t *testing.T) {
501501
getErrorCode: tt.getErrorCode,
502502
returnUser: tt.returnUser,
503503
intakeUserResponse: &intake.IntakeUserResponse{
504-
Id: utils.Ptr(INTAKE_USER_ID),
504+
Id: utils.Ptr(intakeUserId),
505505
},
506506
}
507-
handler := DeleteIntakeUserWaitHandler(context.Background(), apiClient, PROJECT_ID, REGION, INTAKE_ID, INTAKE_USER_ID)
507+
handler := DeleteIntakeUserWaitHandler(context.Background(), apiClient, projectId, region, intakeId, intakeUserId)
508508
_, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background())
509509

510510
if (err != nil) != tt.wantErr {

0 commit comments

Comments
 (0)