Skip to content

Commit 711e123

Browse files
committed
Add protocol tests for 5x0
1 parent 591997c commit 711e123

File tree

5 files changed

+419
-680
lines changed

5 files changed

+419
-680
lines changed

packages/bolt-connection/src/packstream/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@
1919

2020
import * as v1 from './packstream-v1'
2121
import * as v2 from './packstream-v2'
22-
import * as v5 from './packstream-v5'
2322
import * as structure from './structure'
2423

25-
export { v1, v2, v5, structure }
24+
export { v1, v2, structure }
2625

2726
export default v2

packages/bolt-connection/src/packstream/packstream-v5.js

Lines changed: 0 additions & 121 deletions
This file was deleted.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`#unit BoltProtocolV5x0 .packable() should pack not pack graph types (Node) 1`] = `"It is not allowed to pass nodes in query parameters, given: (c:a {a:\\"b\\"})"`;
4+
5+
exports[`#unit BoltProtocolV5x0 .packable() should pack not pack graph types (Path) 1`] = `"It is not allowed to pass paths in query parameters, given: [object Object]"`;
6+
7+
exports[`#unit BoltProtocolV5x0 .packable() should pack not pack graph types (PathSegment) 1`] = `"Cannot read properties of null (reading 'writeUInt8')"`;
8+
9+
exports[`#unit BoltProtocolV5x0 .packable() should pack not pack graph types (Relationship) 1`] = `"It is not allowed to pass relationships in query parameters, given: (e)-[:a {b:\\"c\\"}]->(f)"`;
10+
11+
exports[`#unit BoltProtocolV5x0 .packable() should pack not pack graph types (UnboundRelationship) 1`] = `"It is not allowed to pass unbound relationships in query parameters, given: -[:a {b:\\"c\\"}]->"`;
12+
13+
exports[`#unit BoltProtocolV5x0 .unpack() should not unpack with wrong size(Date with less fields) 1`] = `"Wrong struct size for Date, expected 1 but was 0"`;
14+
15+
exports[`#unit BoltProtocolV5x0 .unpack() should not unpack with wrong size(Date with more fields) 1`] = `"Wrong struct size for Date, expected 1 but was 2"`;
16+
17+
exports[`#unit BoltProtocolV5x0 .unpack() should not unpack with wrong size(DateTimeWithZoneId with less fields) 1`] = `"Wrong struct size for DateTimeWithZoneId, expected 3 but was 2"`;
18+
19+
exports[`#unit BoltProtocolV5x0 .unpack() should not unpack with wrong size(DateTimeWithZoneId with more fields) 1`] = `"Wrong struct size for DateTimeWithZoneId, expected 3 but was 4"`;
20+
21+
exports[`#unit BoltProtocolV5x0 .unpack() should not unpack with wrong size(DateTimeWithZoneOffset with less fields) 1`] = `"Wrong struct size for DateTimeWithZoneOffset, expected 3 but was 2"`;
22+
23+
exports[`#unit BoltProtocolV5x0 .unpack() should not unpack with wrong size(DateTimeWithZoneOffset with more fields) 1`] = `"Wrong struct size for DateTimeWithZoneOffset, expected 3 but was 4"`;
24+
25+
exports[`#unit BoltProtocolV5x0 .unpack() should not unpack with wrong size(Duration with less fields) 1`] = `"Wrong struct size for Duration, expected 4 but was 3"`;
26+
27+
exports[`#unit BoltProtocolV5x0 .unpack() should not unpack with wrong size(Duration with more fields) 1`] = `"Wrong struct size for Duration, expected 4 but was 5"`;
28+
29+
exports[`#unit BoltProtocolV5x0 .unpack() should not unpack with wrong size(LocalDateTime with less fields) 1`] = `"Wrong struct size for LocalDateTime, expected 2 but was 1"`;
30+
31+
exports[`#unit BoltProtocolV5x0 .unpack() should not unpack with wrong size(LocalDateTime with more fields) 1`] = `"Wrong struct size for LocalDateTime, expected 2 but was 3"`;
32+
33+
exports[`#unit BoltProtocolV5x0 .unpack() should not unpack with wrong size(LocalTime with less fields) 1`] = `"Wrong struct size for LocalTime, expected 1 but was 0"`;
34+
35+
exports[`#unit BoltProtocolV5x0 .unpack() should not unpack with wrong size(LocalTime with more fields) 1`] = `"Wrong struct size for LocalTime, expected 1 but was 2"`;
36+
37+
exports[`#unit BoltProtocolV5x0 .unpack() should not unpack with wrong size(Node with less fields) 1`] = `"Wrong struct size for Node, expected 4 but was 3"`;
38+
39+
exports[`#unit BoltProtocolV5x0 .unpack() should not unpack with wrong size(Node with more fields) 1`] = `"Wrong struct size for Node, expected 4 but was 5"`;
40+
41+
exports[`#unit BoltProtocolV5x0 .unpack() should not unpack with wrong size(Path with less fields) 1`] = `"Wrong struct size for Node, expected 4 but was 3"`;
42+
43+
exports[`#unit BoltProtocolV5x0 .unpack() should not unpack with wrong size(Path with more fields) 1`] = `"Wrong struct size for Node, expected 4 but was 3"`;
44+
45+
exports[`#unit BoltProtocolV5x0 .unpack() should not unpack with wrong size(Point with less fields) 1`] = `"Wrong struct size for Point2D, expected 3 but was 2"`;
46+
47+
exports[`#unit BoltProtocolV5x0 .unpack() should not unpack with wrong size(Point with more fields) 1`] = `"Wrong struct size for Point2D, expected 3 but was 4"`;
48+
49+
exports[`#unit BoltProtocolV5x0 .unpack() should not unpack with wrong size(Point3D with less fields) 1`] = `"Wrong struct size for Point3D, expected 4 but was 3"`;
50+
51+
exports[`#unit BoltProtocolV5x0 .unpack() should not unpack with wrong size(Point3D with more fields) 1`] = `"Wrong struct size for Point3D, expected 4 but was 5"`;
52+
53+
exports[`#unit BoltProtocolV5x0 .unpack() should not unpack with wrong size(Relationship with less fields) 1`] = `"Wrong struct size for Relationship, expected 8 but was 5"`;
54+
55+
exports[`#unit BoltProtocolV5x0 .unpack() should not unpack with wrong size(Relationship with more fields) 1`] = `"Wrong struct size for Relationship, expected 8 but was 9"`;
56+
57+
exports[`#unit BoltProtocolV5x0 .unpack() should not unpack with wrong size(Time with less fields) 1`] = `"Wrong struct size for Time, expected 2 but was 1"`;
58+
59+
exports[`#unit BoltProtocolV5x0 .unpack() should not unpack with wrong size(Time with more fileds) 1`] = `"Wrong struct size for Time, expected 2 but was 3"`;
60+
61+
exports[`#unit BoltProtocolV5x0 .unpack() should not unpack with wrong size(UnboundRelationship with less fields) 1`] = `"Wrong struct size for UnboundRelationship, expected 4 but was 3"`;
62+
63+
exports[`#unit BoltProtocolV5x0 .unpack() should not unpack with wrong size(UnboundRelationship with more fields) 1`] = `"Wrong struct size for UnboundRelationship, expected 4 but was 5"`;

0 commit comments

Comments
 (0)