-
Notifications
You must be signed in to change notification settings - Fork 0
/
report.tap
831 lines (725 loc) · 23.6 KB
/
report.tap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
TAP version 13
# Subtest: test/helper/log.ts
1..0 # no tests found
ok 1 - test/helper/log.ts # SKIP no tests found
# Subtest: test/helper/sdk.ts
1..0 # no tests found
ok 2 - test/helper/sdk.ts # SKIP no tests found
# Subtest: test/metadata/action.ts
# Subtest: add a custom type
ok 1 - should be equal
ok 2 - should be equal
1..2
ok 1 - add a custom type # time=117.116ms
# Subtest: update action
ok 1 - should be equal
1..1
ok 2 - update action # time=57.07ms
# Subtest: add permission
ok 1 - should be equal
1..1
ok 3 - add permission # time=58.802ms
# Subtest: drop permission
ok 1 - should be equal
1..1
ok 4 - drop permission # time=62.354ms
[1641626091683] [32mINFO[39m (10714 on ElvisMini.local):
0: {
"message": "success"
}
1: {
"message": "success"
}
msg: {
"depth": null
}
# Subtest: drop action
ok 1 - should be equal
1..1
ok 5 - drop action # time=53.428ms
1..5
# time=354.354ms
ok 3 - test/metadata/action.ts # time=354.354ms
# Subtest: test/metadata/metadata.ts
# Subtest: metadata
# Subtest: export metadata
ok 1 - should be equal
1..1
ok 1 - export metadata # time=19.955ms
# Subtest: reload metadata
ok 1 - should be equal
1..1
ok 2 - reload metadata # time=233.275ms
[1641626093458] [32mINFO[39m (10716 on ElvisMini.local):
0: {
"name": "default",
"kind": "postgres",
"tables": [
{
"table": {
"schema": "auth",
"name": "provider"
}
},
{
"table": {
"schema": "auth",
"name": "role"
}
},
{
"table": {
"schema": "auth",
"name": "user"
}
},
{
"table": {
"schema": "auth",
"name": "user_provider"
}
},
{
"table": {
"schema": "auth",
"name": "user_role"
}
},
{
"table": {
"schema": "public",
"name": "file"
},
"select_permissions": [
{
"role": "user",
"permission": {
"columns": [
"name",
"id"
],
"filter": {}
}
}
]
},
{
"table": {
"schema": "public",
"name": "films"
}
},
{
"table": {
"schema": "public",
"name": "records"
}
}
],
"configuration": {
"connection_info": {
"use_prepared_statements": true,
"database_url": {
"from_env": "HASURA_GRAPHQL_DATABASE_URL"
},
"isolation_level": "read-committed",
"pool_settings": {
"connection_lifetime": 600,
"retries": 1,
"idle_timeout": 180,
"max_connections": 50
}
}
}
}
# Subtest: clear metadata
ok 1 - should be equal
1..1
ok 3 - clear metadata # time=111.023ms
# Subtest: replace metadata
ok 1 - type is Array
1..1
ok 4 - replace metadata # time=161.82ms
1..4
ok 1 - metadata # time=530.978ms
# Subtest: inconsistent metadata
# Subtest: get inconsistent
ok 1 - type is Array
1..1
ok 1 - get inconsistent # time=5.452ms
[1641626093979] [32mINFO[39m (10716 on ElvisMini.local):
is_consistent: true
inconsistent_objects: []
# Subtest: drop inconsistent
ok 1 - should be equal
1..1
ok 2 - drop inconsistent # time=50.648ms
1..2
ok 2 - inconsistent metadata # time=61.701ms
1..2
# time=594.822ms
ok 4 - test/metadata/metadata.ts # time=594.822ms
# Subtest: test/metadata/remote_schema.ts
# Subtest: add a remote schema
not ok 1 - should be equal
---
compare: ===
at:
line: 17
column: 5
file: test/metadata/remote_schema.ts
type: Test
stack: |
Test.<anonymous> (test/metadata/remote_schema.ts:17:5)
source: |
} catch (err) {
t.equal(err.response?.code, 'already-exists')
----^
}
})
diff: |
--- expected
+++ actual
@@ -1,1 +1,1 @@
-already-exists
+remote-schema-error
...
1..1
# failed 1 test
not ok 1 - add a remote schema # time=1732.472ms
# Subtest: update a remote schema
not ok 1 - (unnamed test)
---
at:
line: 29
column: 5
file: test/metadata/remote_schema.ts
type: Test
stack: |
Test.<anonymous> (test/metadata/remote_schema.ts:29:5)
source: |
} catch (err) {
t.fail()
----^
}
})
...
1..1
# failed 1 test
not ok 2 - update a remote schema # time=6.61ms
# Subtest: reload a remote schema
not ok 1 - (unnamed test)
---
at:
line: 40
column: 5
file: test/metadata/remote_schema.ts
type: Test
stack: |
Test.<anonymous> (test/metadata/remote_schema.ts:40:5)
source: |
log.error(err.response)
t.fail()
----^
}
})
...
1..1
# failed 1 test
not ok 3 - reload a remote schema # time=5.712ms
# Subtest: introspect a remote schema
not ok 1 - (unnamed test)
---
at:
line: 52
column: 5
file: test/metadata/remote_schema.ts
type: Test
stack: |
Test.<anonymous> (test/metadata/remote_schema.ts:52:5)
source: |
} catch (err) {
t.fail()
----^
}
})
...
1..1
# failed 1 test
not ok 4 - introspect a remote schema # time=5.326ms
# Subtest: permission add/drop
# Subtest: add a permission
not ok 1 - should be equal
---
compare: ===
at:
line: 79
column: 6
file: test/metadata/remote_schema.ts
type: Test
stack: |
Test.<anonymous> (test/metadata/remote_schema.ts:79:6)
source: |
log.error(err)
t.equal(err.response?.code, 'already-exists')
-----^
}
})
diff: |
--- expected
+++ actual
@@ -1,1 +1,1 @@
-already-exists
+not-exists
...
1..1
# failed 1 test
not ok 1 - add a permission # time=8.577ms
# Subtest: drop a permission
ok 1 - should be equal
1..1
ok 2 - drop a permission # time=3.971ms
1..2
# failed 1 of 2 tests
not ok 5 - permission add/drop # time=15.04ms
# Subtest: remove a remote schema
ok 1 - should be equal
1..1
ok 6 - remove a remote schema # time=3.898ms
1..6
# failed 5 of 6 tests
# time=1772.588ms
[1641626097626] [31mERROR[39m (10718 on ElvisMini.local):
path: "$.args"
code: "not-exists"
error: "remote schema with name \"fake\" does not exist"
[1641626097640] [31mERROR[39m (10718 on ElvisMini.local): [36mnot-exists[39m
err: {
"type": "MetadataError",
"message": "not-exists",
"stack":
Error: not-exists
at MetadataQuery.run (/Volumes/Root/Users/Elvis/WIP/SeaLight/server/hasura-sdk/src/abstract_query.ts:2:894)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Test.<anonymous> (/Volumes/Root/Users/Elvis/WIP/SeaLight/server/hasura-sdk/test/metadata/remote_schema.ts:75:17)
"response": {
"path": "$.args",
"error": "remote schema \"fake\" doesn't exist",
"code": "not-exists"
},
"timestamp": "2022-01-08T07:14:57.640Z"
}
[1641626097648] [31mERROR[39m (10718 on ElvisMini.local):
path: "$.args"
code: "not-exists"
error: "remote schema \"fake\" doesn't exist"
not ok 5 - test/metadata/remote_schema.ts # time=1772.588ms
---
env:
TS_NODE_COMPILER_OPTIONS: "{}"
file: test/metadata/remote_schema.ts
timeout: 30000
command: /usr/local/bin/node
args:
- -r
- /Volumes/Root/Users/Elvis/WIP/SeaLight/server/node_modules/.pnpm/[email protected]_bad060d5f9aca5284661d88d739ba15b/node_modules/ts-node/register/index.js
- test/metadata/remote_schema.ts
stdio:
- 0
- pipe
- 2
cwd: /Volumes/Root/Users/Elvis/WIP/SeaLight/server/hasura-sdk
exitCode: 1
...
# Subtest: test/metadata/rest.ts
# Subtest: create a rest Endpoint
# Subtest: create collection
ok 1 - should be equal
1..1
ok 1 - create collection # time=75.416ms
# Subtest: add collection to allowlist
ok 1 - should be equal
1..1
ok 2 - add collection to allowlist # time=78.723ms
# Subtest: create REST endpoint
ok 1 - should be equal
1..1
ok 3 - create REST endpoint # time=48.743ms
1..3
ok 1 - create a rest Endpoint # time=207.813ms
# Subtest: edit a Endpoint
# Subtest: drop rest endpoint
ok 1 - should be equal
1..1
ok 1 - drop rest endpoint # time=76.587ms
# Subtest: drop query from collection
ok 1 - should be equal
1..1
ok 2 - drop query from collection # time=56.454ms
# Subtest: add query to collection
ok 1 - should be equal
1..1
ok 3 - add query to collection # time=54.301ms
# Subtest: create rest endpoint
ok 1 - should be equal
1..1
ok 4 - create rest endpoint # time=54.658ms
1..4
ok 2 - edit a Endpoint # time=248.152ms
# Subtest: clean
# Subtest: drop a Endpoint
ok 1 - should be equal
1..1
ok 1 - drop a Endpoint # time=52.732ms
# Subtest: drop collection from allowlist
ok 1 - should be equal
1..1
ok 2 - drop collection from allowlist # time=60.604ms
[1641626100498] [32mINFO[39m (10719 on ElvisMini.local):
message: "success"
# Subtest: drop a collection
ok 1 - should be equal
1..1
ok 3 - drop a collection # time=61.418ms
1..3
ok 3 - clean # time=177.177ms
1..3
# time=635.408ms
ok 6 - test/metadata/rest.ts # time=635.408ms
# Subtest: test/metadata/setting.ts
# Subtest: InheritedRole
# Subtest: add inherited role
ok 1 - should be equal
1..1
ok 1 - add inherited role # time=17.711ms
# Subtest: drop inherited role
ok 1 - should be equal
1..1
ok 2 - drop inherited role # time=5.278ms
1..2
ok 1 - InheritedRole # time=27.577ms
# Subtest: TLSallowList
# Subtest: add
ok 1 - should be equal
1..1
ok 1 - add # time=59.789ms
# Subtest: drop
ok 1 - should be equal
1..1
ok 2 - drop # time=67.118ms
1..2
ok 2 - TLSallowList # time=132.625ms
[1641626102024] [31mERROR[39m (10721 on ElvisMini.local):
path: "$.args"
code: "not-exists"
error: "the following parent role(s) are not found: anonymous which are required to construct the inherited role: \"guest\""
[1641626102032] [31mERROR[39m (10721 on ElvisMini.local):
path: "$.args"
code: "not-exists"
error: "\"guest\" inherited role doesn't exist"
1..2
# time=339.439ms
ok 7 - test/metadata/setting.ts # time=339.439ms
# Subtest: test/metadata/source.ts
# Subtest: all api shouled not be empty
# Subtest: source.add
ok 1 - should not be equal
ok 2 - should not be equal
ok 3 - should not be equal
ok 4 - should not be equal
ok 5 - should not be equal
ok 6 - should not be equal
ok 7 - should not be equal
ok 8 - should not be equal
1..8
ok 1 - source.add # time=221.718ms
# Subtest: source.drop
ok 1 - should not be equal
ok 2 - should not be equal
ok 3 - should not be equal
ok 4 - should not be equal
ok 5 - should not be equal
ok 6 - should not be equal
ok 7 - should not be equal
ok 8 - should not be equal
1..8
ok 2 - source.drop # time=66.851ms
1..2
ok 1 - all api shouled not be empty # time=292.859ms
# Subtest: source operations
# Subtest: add
ok 1 - should be equal
1..1
ok 1 - add # time=225.58ms
# Subtest: drop
ok 1 - should be equal
1..1
ok 2 - drop # time=49.498ms
1..2
ok 2 - source operations # time=281.295ms
# Subtest: bulk
ok 1 - should be equal
ok 2 - should be equal
1..2
ok 3 - bulk # time=260.613ms
1..3
# time=837ms
ok 8 - test/metadata/source.ts # time=837ms
# Subtest: test/metadata/table.ts
[33mUse async .hasTable to check if table exists and then use plain .createTable. Since .createTableIfNotExists actually just generates plain "CREATE TABLE IF NOT EXIST..." query it will not work correctly if there are any alter table queries generated for columns afterwards. To not break old migrations this function is left untouched for now, but it should not be used when writing new code and it is removed from documentation.[39m
[1641626106814] [32mINFO[39m (10725 on ElvisMini.local):
# Subtest: table
0: {
"result_type": "CommandOk",
"result": null
}
1: {
"result_type": "CommandOk",
"result": null
}
msg: {
"depth": null
}
# Subtest: track tables
ok 1 - should be equal
ok 2 - should be equal
ok 3 - should be equal
1..3
ok 1 - track tables # time=474.55ms
# Subtest: set as enum
ok 1 - should be equal
1..1
ok 2 - set as enum # time=165.122ms
# Subtest: customize a table
ok 1 - should be equal
1..1
ok 3 - customize a table # time=164.043ms
1..3
ok 1 - table # time=811.083ms
# Subtest: permission
# Subtest: create a insert permission
ok 1 - should be equal
1..1
ok 1 - create a insert permission # time=168.164ms
# Subtest: create a select permission
ok 1 - should be equal
1..1
ok 2 - create a select permission # time=170.815ms
# Subtest: create an update permission
ok 1 - should be equal
1..1
ok 3 - create an update permission # time=170.003ms
# Subtest: create a delete permission
ok 1 - should be equal
1..1
ok 4 - create a delete permission # time=158.757ms
# Subtest: commnet
ok 1 - should be equal
1..1
ok 5 - commnet # time=178.006ms
# Subtest: drop a insert permission
ok 1 - should be equal
1..1
ok 6 - drop a insert permission # time=171.616ms
# Subtest: drop a select permission
ok 1 - should be equal
1..1
ok 7 - drop a select permission # time=157.028ms
[1641626108475] [32mINFO[39m (10725 on ElvisMini.local):
message: "success"
# Subtest: drop a update permission
ok 1 - should be equal
1..1
ok 8 - drop a update permission # time=170.628ms
# Subtest: drop a delete permission
ok 1 - should be equal
1..1
ok 9 - drop a delete permission # time=154.903ms
1..9
ok 2 - permission # time=1503.81ms
# Subtest: relationship
# Subtest: addObjectRelationship
ok 1 - should be equal
1..1
ok 1 - addObjectRelationship # time=169.586ms
[1641626109301] [32mINFO[39m (10725 on ElvisMini.local):
message: "success"
msg: {
"depth": null
}
# Subtest: addArrayRelationship
ok 1 - should be equal
1..1
ok 2 - addArrayRelationship # time=170.467ms
[1641626109472] [32mINFO[39m (10725 on ElvisMini.local):
message: "success"
msg: {
"depth": null
}
# Subtest: drop
ok 1 - should be equal
1..1
ok 3 - drop # time=160.719ms
[1641626109633] [32mINFO[39m (10725 on ElvisMini.local):
message: "success"
msg: {
"depth": null
}
# Subtest: rename
ok 1 - should be equal
1..1
ok 4 - rename # time=168.54ms
[1641626109802] [32mINFO[39m (10725 on ElvisMini.local):
message: "success"
msg: {
"depth": null
}
# Subtest: commnet
ok 1 - should be equal
1..1
ok 5 - commnet # time=161.336ms
1..5
ok 3 - relationship # time=833.313ms
[1641626109963] [32mINFO[39m (10725 on ElvisMini.local):
# Subtest: schema function
message: "success"
msg: {
"depth": null
}
# Subtest: add a schema function
ok 1 - should be equal
1..1
ok 1 - add a schema function # time=441.336ms
# Subtest: track schema function
ok 1 - should be equal
1..1
ok 2 - track schema function # time=168.532ms
[1641626110407] [32mINFO[39m (10725 on ElvisMini.local):
[1641626110575] [32mINFO[39m (10725 on ElvisMini.local):
result_type: "CommandOk"
result: null
message: "success"
# Subtest: customize schema function
ok 1 - should be equal
1..1
ok 3 - customize schema function # time=166.737ms
[1641626110742] [32mINFO[39m (10725 on ElvisMini.local):
message: "success"
# Subtest: add a permission
ok 1 - should be equal
ok 2 - should be equal
1..2
ok 4 - add a permission # time=338.994ms
[1641626111081] [32mINFO[39m (10725 on ElvisMini.local):
0: {
"message": "success"
}
1: {
"message": "success"
}
# Subtest: drop a permission
ok 1 - should be equal
1..1
ok 5 - drop a permission # time=170.877ms
# Subtest: untrack a function
ok 1 - should be equal
1..1
ok 6 - untrack a function # time=169.515ms
1..6
ok 4 - schema function # time=1459.757ms
# Subtest: computed field
# Subtest: add a computed field function
ok 1 - should be equal
1..1
ok 1 - add a computed field function # time=415.302ms
# Subtest: add a computed field
ok 1 - should be equal
1..1
ok 2 - add a computed field # time=166.749ms
# Subtest: drop a computed field
ok 1 - should be equal
1..1
ok 3 - drop a computed field # time=171.393ms
# Subtest: drop functions
ok 1 - should be equal
1..1
ok 4 - drop functions # time=422.798ms
1..4
ok 5 - computed field # time=1178.577ms
# Subtest: untrack tables
ok 1 - should be equal
ok 2 - should be equal
ok 3 - should be equal
1..3
ok 6 - untrack tables # time=435.175ms
1..6
# time=6766.672ms
[1641626113463] [32mINFO[39m (10725 on ElvisMini.local):
result_type: "CommandOk"
result: null
msg: {
"depth": null
}
ok 9 - test/metadata/table.ts # time=6766.672ms
# Subtest: test/metadata/trigger.ts
# Subtest: event trigger
# Subtest: add a event trigger
ok 1 - should be equal
1..1
ok 1 - add a event trigger # time=205.416ms
# Subtest: invoke a event trigger
ok 1 - should be equal
1..1
ok 2 - invoke a event trigger # time=5.134ms
# Subtest: redeliver a event trigger
ok 1 - should be equal
1..1
ok 3 - redeliver a event trigger # time=15.395ms
[1641626115889] [31mERROR[39m (10734 on ElvisMini.local):
path: "$.args"
code: "not-exists"
error: "event not found"
# Subtest: drop a event trigger
ok 1 - should be equal
1..1
ok 4 - drop a event trigger # time=172.714ms
1..4
ok 1 - event trigger # time=403.733ms
[1641626116063] [32mINFO[39m (10734 on ElvisMini.local):
# Subtest: cron trigger
message: "success"
# Subtest: add a cron trigger
ok 1 - should be equal
1..1
ok 1 - add a cron trigger # time=80.438ms
[1641626116149] [32mINFO[39m (10734 on ElvisMini.local):
message: "success"
# Subtest: drop a cron trigger
ok 1 - should be equal
1..1
ok 2 - drop a cron trigger # time=57.616ms
1..2
ok 2 - cron trigger # time=144.176ms
# Subtest: schedule trigger
# Subtest: add a schedule trigger
ok 1 - should be equal
1..1
ok 1 - add a schedule trigger # time=9.039ms
# Subtest: drop a schedule trigger
ok 1 - should be equal
1..1
ok 2 - drop a schedule trigger # time=8.976ms
1..2
ok 3 - schedule trigger # time=20.625ms
1..3
# time=570.732ms
[1641626116219] [32mINFO[39m (10734 on ElvisMini.local):
message: "success"
event_id: "8792debb-3e76-4b7b-a289-b88894016cf5"
[1641626116228] [32mINFO[39m (10734 on ElvisMini.local):
message: "success"
ok 10 - test/metadata/trigger.ts # time=570.732ms
1..10
# failed 1 of 10 tests
# skip: 2
# time=29067.2ms