@@ -133,7 +133,7 @@ func TestService_CreateResource(t *testing.T) {
133
133
Enqueue (mock .Anything , mock .Anything ).
134
134
Run (func (ctx context.Context , jobs ... worker.Job ) {
135
135
assert .Len (t , jobs , 1 )
136
- assert .Equal (t , "sync-urn:odpf :entropy:mock:project:child-1650536955" , jobs [0 ].ID )
136
+ assert .Equal (t , "sync-orn :entropy:mock:project:child-1650536955" , jobs [0 ].ID )
137
137
}).
138
138
Return (nil )
139
139
@@ -145,7 +145,7 @@ func TestService_CreateResource(t *testing.T) {
145
145
Project : "project" ,
146
146
},
147
147
want : & resource.Resource {
148
- URN : "urn:odpf :entropy:mock:project:child" ,
148
+ URN : "orn :entropy:mock:project:child" ,
149
149
Kind : "mock" ,
150
150
Name : "child" ,
151
151
Project : "project" ,
@@ -179,7 +179,7 @@ func TestService_UpdateResource(t *testing.T) {
179
179
t .Parallel ()
180
180
testErr := errors .New ("failed" )
181
181
testResource := resource.Resource {
182
- URN : "urn:odpf :entropy:mock:project:child" ,
182
+ URN : "orn :entropy:mock:project:child" ,
183
183
Kind : "mock" ,
184
184
Name : "child" ,
185
185
Project : "project" ,
@@ -201,13 +201,13 @@ func TestService_UpdateResource(t *testing.T) {
201
201
t .Helper ()
202
202
resourceRepo := & mocks.ResourceStore {}
203
203
resourceRepo .EXPECT ().
204
- GetByURN (mock .Anything , "urn:odpf :entropy:mock:project:child" ).
204
+ GetByURN (mock .Anything , "orn :entropy:mock:project:child" ).
205
205
Return (nil , errors .ErrNotFound ).
206
206
Once ()
207
207
208
208
return core .New (resourceRepo , nil , & mocks.AsyncWorker {}, deadClock , nil )
209
209
},
210
- urn : "urn:odpf :entropy:mock:project:child" ,
210
+ urn : "orn :entropy:mock:project:child" ,
211
211
newSpec : resource.Spec {Configs : []byte (`{"foo": "bar"}` )},
212
212
want : nil ,
213
213
wantErr : errors .ErrNotFound ,
@@ -223,13 +223,13 @@ func TestService_UpdateResource(t *testing.T) {
223
223
224
224
resourceRepo := & mocks.ResourceStore {}
225
225
resourceRepo .EXPECT ().
226
- GetByURN (mock .Anything , "urn:odpf :entropy:mock:project:child" ).
226
+ GetByURN (mock .Anything , "orn :entropy:mock:project:child" ).
227
227
Return (& testResource , nil ).
228
228
Once ()
229
229
230
230
return core .New (resourceRepo , mod , & mocks.AsyncWorker {}, deadClock , nil )
231
231
},
232
- urn : "urn:odpf :entropy:mock:project:child" ,
232
+ urn : "orn :entropy:mock:project:child" ,
233
233
newSpec : resource.Spec {Configs : []byte (`{"foo": "bar"}` )},
234
234
want : nil ,
235
235
wantErr : errors .ErrInvalid ,
@@ -245,7 +245,7 @@ func TestService_UpdateResource(t *testing.T) {
245
245
246
246
resourceRepo := & mocks.ResourceStore {}
247
247
resourceRepo .EXPECT ().
248
- GetByURN (mock .Anything , "urn:odpf :entropy:mock:project:child" ).
248
+ GetByURN (mock .Anything , "orn :entropy:mock:project:child" ).
249
249
Return (& testResource , nil ).
250
250
Once ()
251
251
@@ -262,15 +262,15 @@ func TestService_UpdateResource(t *testing.T) {
262
262
Enqueue (mock .Anything , mock .Anything ).
263
263
Run (func (ctx context.Context , jobs ... worker.Job ) {
264
264
assert .Len (t , jobs , 1 )
265
- assert .Equal (t , jobs [0 ].ID , "sync-urn:odpf :entropy:mock:project:child-1650536955" )
265
+ assert .Equal (t , jobs [0 ].ID , "sync-orn :entropy:mock:project:child-1650536955" )
266
266
assert .Equal (t , jobs [0 ].Kind , "sync_resource" )
267
267
}).
268
268
Return (nil ).
269
269
Once ()
270
270
271
271
return core .New (resourceRepo , mod , mockWorker , deadClock , nil )
272
272
},
273
- urn : "urn:odpf :entropy:mock:project:child" ,
273
+ urn : "orn :entropy:mock:project:child" ,
274
274
newSpec : resource.Spec {Configs : []byte (`{"foo": "bar"}` )},
275
275
want : nil ,
276
276
wantErr : testErr ,
@@ -283,7 +283,7 @@ func TestService_UpdateResource(t *testing.T) {
283
283
mod .EXPECT ().
284
284
Plan (mock .Anything , mock .Anything , mock .Anything ).
285
285
Return (& resource.Resource {
286
- URN : "urn:odpf :entropy:mock:project:child" ,
286
+ URN : "orn :entropy:mock:project:child" ,
287
287
Kind : "mock" ,
288
288
Name : "child" ,
289
289
Project : "project" ,
@@ -296,7 +296,7 @@ func TestService_UpdateResource(t *testing.T) {
296
296
297
297
resourceRepo := & mocks.ResourceStore {}
298
298
resourceRepo .EXPECT ().
299
- GetByURN (mock .Anything , "urn:odpf :entropy:mock:project:child" ).
299
+ GetByURN (mock .Anything , "orn :entropy:mock:project:child" ).
300
300
Return (& testResource , nil ).Once ()
301
301
302
302
resourceRepo .EXPECT ().
@@ -314,17 +314,17 @@ func TestService_UpdateResource(t *testing.T) {
314
314
Return (nil ).
315
315
Run (func (ctx context.Context , jobs ... worker.Job ) {
316
316
assert .Len (t , jobs , 1 )
317
- assert .Equal (t , jobs [0 ].ID , "sync-urn:odpf :entropy:mock:project:child-1650536955" )
317
+ assert .Equal (t , jobs [0 ].ID , "sync-orn :entropy:mock:project:child-1650536955" )
318
318
assert .Equal (t , jobs [0 ].Kind , "sync_resource" )
319
319
}).
320
320
Once ()
321
321
322
322
return core .New (resourceRepo , mod , mockWorker , deadClock , nil )
323
323
},
324
- urn : "urn:odpf :entropy:mock:project:child" ,
324
+ urn : "orn :entropy:mock:project:child" ,
325
325
newSpec : resource.Spec {Configs : []byte (`{"foo": "bar"}` )},
326
326
want : & resource.Resource {
327
- URN : "urn:odpf :entropy:mock:project:child" ,
327
+ URN : "orn :entropy:mock:project:child" ,
328
328
Kind : "mock" ,
329
329
Name : "child" ,
330
330
Project : "project" ,
@@ -374,13 +374,13 @@ func TestService_DeleteResource(t *testing.T) {
374
374
t .Helper ()
375
375
resourceRepo := & mocks.ResourceStore {}
376
376
resourceRepo .EXPECT ().
377
- GetByURN (mock .Anything , "urn:odpf :entropy:mock:foo:bar" ).
377
+ GetByURN (mock .Anything , "orn :entropy:mock:foo:bar" ).
378
378
Return (nil , testErr ).
379
379
Once ()
380
380
381
381
return core .New (resourceRepo , nil , & mocks.AsyncWorker {}, deadClock , nil )
382
382
},
383
- urn : "urn:odpf :entropy:mock:foo:bar" ,
383
+ urn : "orn :entropy:mock:foo:bar" ,
384
384
wantErr : testErr ,
385
385
},
386
386
{
@@ -391,7 +391,7 @@ func TestService_DeleteResource(t *testing.T) {
391
391
mod .EXPECT ().
392
392
Plan (mock .Anything , mock .Anything , mock .Anything ).
393
393
Return (& resource.Resource {
394
- URN : "urn:odpf :entropy:mock:project:child" ,
394
+ URN : "orn :entropy:mock:project:child" ,
395
395
Kind : "mock" ,
396
396
Name : "child" ,
397
397
Project : "project" ,
@@ -402,9 +402,9 @@ func TestService_DeleteResource(t *testing.T) {
402
402
403
403
resourceRepo := & mocks.ResourceStore {}
404
404
resourceRepo .EXPECT ().
405
- GetByURN (mock .Anything , "urn:odpf :entropy:mock:foo:bar" ).
405
+ GetByURN (mock .Anything , "orn :entropy:mock:foo:bar" ).
406
406
Return (& resource.Resource {
407
- URN : "urn:odpf :entropy:mock:project:child" ,
407
+ URN : "orn :entropy:mock:project:child" ,
408
408
Kind : "mock" ,
409
409
Name : "child" ,
410
410
Project : "project" ,
@@ -421,7 +421,7 @@ func TestService_DeleteResource(t *testing.T) {
421
421
422
422
return core .New (resourceRepo , mod , & mocks.AsyncWorker {}, deadClock , nil )
423
423
},
424
- urn : "urn:odpf :entropy:mock:foo:bar" ,
424
+ urn : "orn :entropy:mock:foo:bar" ,
425
425
wantErr : errors .ErrInternal ,
426
426
},
427
427
{
@@ -432,7 +432,7 @@ func TestService_DeleteResource(t *testing.T) {
432
432
mod .EXPECT ().
433
433
Plan (mock .Anything , mock .Anything , mock .Anything ).
434
434
Return (& resource.Resource {
435
- URN : "urn:odpf :entropy:mock:project:child" ,
435
+ URN : "orn :entropy:mock:project:child" ,
436
436
Kind : "mock" ,
437
437
Name : "child" ,
438
438
Project : "project" ,
@@ -443,9 +443,9 @@ func TestService_DeleteResource(t *testing.T) {
443
443
444
444
resourceRepo := & mocks.ResourceStore {}
445
445
resourceRepo .EXPECT ().
446
- GetByURN (mock .Anything , "urn:odpf :entropy:mock:foo:bar" ).
446
+ GetByURN (mock .Anything , "orn :entropy:mock:foo:bar" ).
447
447
Return (& resource.Resource {
448
- URN : "urn:odpf :entropy:mock:project:child" ,
448
+ URN : "orn :entropy:mock:project:child" ,
449
449
Kind : "mock" ,
450
450
Name : "child" ,
451
451
Project : "project" ,
@@ -462,7 +462,7 @@ func TestService_DeleteResource(t *testing.T) {
462
462
463
463
return core .New (resourceRepo , mod , & mocks.AsyncWorker {}, deadClock , nil )
464
464
},
465
- urn : "urn:odpf :entropy:mock:foo:bar" ,
465
+ urn : "orn :entropy:mock:foo:bar" ,
466
466
wantErr : nil ,
467
467
},
468
468
}
@@ -506,13 +506,13 @@ func TestService_ApplyAction(t *testing.T) {
506
506
t .Helper ()
507
507
resourceRepo := & mocks.ResourceStore {}
508
508
resourceRepo .EXPECT ().
509
- GetByURN (mock .Anything , "urn:odpf :entropy:mock:foo:bar" ).
509
+ GetByURN (mock .Anything , "orn :entropy:mock:foo:bar" ).
510
510
Return (nil , errors .ErrNotFound ).
511
511
Once ()
512
512
513
513
return core .New (resourceRepo , nil , & mocks.AsyncWorker {}, deadClock , nil )
514
514
},
515
- urn : "urn:odpf :entropy:mock:foo:bar" ,
515
+ urn : "orn :entropy:mock:foo:bar" ,
516
516
action : sampleAction ,
517
517
want : nil ,
518
518
wantErr : errors .ErrNotFound ,
@@ -523,9 +523,9 @@ func TestService_ApplyAction(t *testing.T) {
523
523
t .Helper ()
524
524
resourceRepo := & mocks.ResourceStore {}
525
525
resourceRepo .EXPECT ().
526
- GetByURN (mock .Anything , "urn:odpf :entropy:mock:foo:bar" ).
526
+ GetByURN (mock .Anything , "orn :entropy:mock:foo:bar" ).
527
527
Return (& resource.Resource {
528
- URN : "urn:odpf :entropy:mock:foo:bar" ,
528
+ URN : "orn :entropy:mock:foo:bar" ,
529
529
Kind : "mock" ,
530
530
Project : "foo" ,
531
531
Name : "bar" ,
@@ -534,7 +534,7 @@ func TestService_ApplyAction(t *testing.T) {
534
534
535
535
return core .New (resourceRepo , nil , & mocks.AsyncWorker {}, deadClock , nil )
536
536
},
537
- urn : "urn:odpf :entropy:mock:foo:bar" ,
537
+ urn : "orn :entropy:mock:foo:bar" ,
538
538
action : sampleAction ,
539
539
want : nil ,
540
540
wantErr : errors .ErrInvalid ,
@@ -551,9 +551,9 @@ func TestService_ApplyAction(t *testing.T) {
551
551
552
552
resourceRepo := & mocks.ResourceStore {}
553
553
resourceRepo .EXPECT ().
554
- GetByURN (mock .Anything , "urn:odpf :entropy:mock:foo:bar" ).
554
+ GetByURN (mock .Anything , "orn :entropy:mock:foo:bar" ).
555
555
Return (& resource.Resource {
556
- URN : "urn:odpf :entropy:mock:foo:bar" ,
556
+ URN : "orn :entropy:mock:foo:bar" ,
557
557
Kind : "mock" ,
558
558
Project : "foo" ,
559
559
Name : "bar" ,
@@ -563,7 +563,7 @@ func TestService_ApplyAction(t *testing.T) {
563
563
564
564
return core .New (resourceRepo , mod , & mocks.AsyncWorker {}, deadClock , nil )
565
565
},
566
- urn : "urn:odpf :entropy:mock:foo:bar" ,
566
+ urn : "orn :entropy:mock:foo:bar" ,
567
567
action : sampleAction ,
568
568
want : nil ,
569
569
wantErr : errors .ErrInternal ,
@@ -576,7 +576,7 @@ func TestService_ApplyAction(t *testing.T) {
576
576
mod .EXPECT ().
577
577
Plan (mock .Anything , mock .Anything , sampleAction ).
578
578
Return (& resource.Resource {
579
- URN : "urn:odpf :entropy:mock:foo:bar" ,
579
+ URN : "orn :entropy:mock:foo:bar" ,
580
580
Kind : "mock" ,
581
581
Project : "foo" ,
582
582
Name : "bar" ,
@@ -586,9 +586,9 @@ func TestService_ApplyAction(t *testing.T) {
586
586
587
587
resourceRepo := & mocks.ResourceStore {}
588
588
resourceRepo .EXPECT ().
589
- GetByURN (mock .Anything , "urn:odpf :entropy:mock:foo:bar" ).
589
+ GetByURN (mock .Anything , "orn :entropy:mock:foo:bar" ).
590
590
Return (& resource.Resource {
591
- URN : "urn:odpf :entropy:mock:foo:bar" ,
591
+ URN : "orn :entropy:mock:foo:bar" ,
592
592
Kind : "mock" ,
593
593
Project : "foo" ,
594
594
Name : "bar" ,
@@ -603,10 +603,10 @@ func TestService_ApplyAction(t *testing.T) {
603
603
604
604
return core .New (resourceRepo , mod , & mocks.AsyncWorker {}, deadClock , nil )
605
605
},
606
- urn : "urn:odpf :entropy:mock:foo:bar" ,
606
+ urn : "orn :entropy:mock:foo:bar" ,
607
607
action : sampleAction ,
608
608
want : & resource.Resource {
609
- URN : "urn:odpf :entropy:mock:foo:bar" ,
609
+ URN : "orn :entropy:mock:foo:bar" ,
610
610
Kind : "mock" ,
611
611
Project : "foo" ,
612
612
Name : "bar" ,
0 commit comments