Skip to content

Commit 282180d

Browse files
committed
Re-write bookmarks tests
- test more cases - assert newly created sessions don't return bookmarks
1 parent 3912d7f commit 282180d

11 files changed

+258
-175
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
!: BOLT 3
2+
3+
A: HELLO {"{}": "*"}
4+
*: RESET
5+
6+
{{
7+
C: RUN "RETURN 1 AS n" {} {#BM_IN#, "[mode]": "w"}
8+
S: SUCCESS {"fields": ["n"]}
9+
{{
10+
C: PULL_ALL
11+
----
12+
C: DISCARD_ALL
13+
}}
14+
S: SUCCESS {"type": "w", "bookmark": "#BM_OUT#"}
15+
----
16+
C: RUN "RETURN 1 AS n" {} {#BM_IN#, "mode": "r"}
17+
S: SUCCESS {"fields": ["n"]}
18+
{{
19+
C: PULL_ALL
20+
----
21+
C: DISCARD_ALL
22+
}}
23+
S: SUCCESS {"type": "r", "bookmark": "#BM_OUT#"}
24+
}}
25+
26+
*: RESET
27+
?: GOODBYE
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
!: BOLT 3
2+
3+
A: HELLO {"{}": "*"}
4+
*: RESET
5+
6+
{{
7+
C: BEGIN {#BM_IN#, "[mode]": "w"}
8+
S: SUCCESS {}
9+
C: RUN "RETURN 1 AS n" {} {}
10+
S: SUCCESS {"fields": ["n"]}
11+
{{
12+
C: PULL_ALL
13+
----
14+
C: DISCARD_ALL
15+
}}
16+
S: SUCCESS {"type": "w"}
17+
----
18+
C: BEGIN {#BM_IN#, "mode": "r"}
19+
S: SUCCESS {}
20+
C: RUN "RETURN 1 AS n" {} {}
21+
S: SUCCESS {"fields": ["n"]}
22+
{{
23+
C: PULL_ALL
24+
----
25+
C: DISCARD_ALL
26+
}}
27+
S: SUCCESS {"type": "r"}
28+
}}
29+
C: COMMIT
30+
S: SUCCESS {"bookmark": "#BM_OUT#"}
31+
32+
*: RESET
33+
?: GOODBYE

tests/stub/bookmarks/scripts/v3/send_and_receive_bookmark_read_tx.script

Lines changed: 0 additions & 14 deletions
This file was deleted.

tests/stub/bookmarks/scripts/v3/send_and_receive_bookmark_write_tx.script

Lines changed: 0 additions & 14 deletions
This file was deleted.

tests/stub/bookmarks/scripts/v3/send_bookmark_write_tx.script

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
!: BOLT 4.4
2+
3+
A: HELLO {"{}": "*"}
4+
*: RESET
5+
6+
{{
7+
C: RUN "RETURN 1 AS n" {} {#BM_IN#, "[mode]": "w"}
8+
S: SUCCESS {"fields": ["n"]}
9+
{{
10+
C: PULL {"n": {"Z": "*"}, "[qid]": -1}
11+
----
12+
C: DISCARD {"n": {"Z": "*"}, "[qid]": -1}
13+
}}
14+
S: SUCCESS {"type": "w", "bookmark": "#BM_OUT#"}
15+
----
16+
C: RUN "RETURN 1 AS n" {} {#BM_IN#, "mode": "r"}
17+
S: SUCCESS {"fields": ["n"]}
18+
{{
19+
C: PULL {"n": {"Z": "*"}, "[qid]": -1}
20+
----
21+
C: DISCARD {"n": {"Z": "*"}, "[qid]": -1}
22+
}}
23+
S: SUCCESS {"type": "r", "bookmark": "#BM_OUT#"}
24+
}}
25+
26+
*: RESET
27+
?: GOODBYE
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
!: BOLT 4.4
2+
3+
A: HELLO {"{}": "*"}
4+
*: RESET
5+
6+
{{
7+
C: BEGIN {#BM_IN#, "[mode]": "w"}
8+
S: SUCCESS {}
9+
C: RUN "RETURN 1 AS n" {} {}
10+
S: SUCCESS {"fields": ["n"]}
11+
{{
12+
C: PULL {"n": {"Z": "*"}, "[qid]": -1}
13+
----
14+
C: DISCARD {"n": {"Z": "*"}, "[qid]": -1}
15+
}}
16+
S: SUCCESS {"type": "w"}
17+
----
18+
C: BEGIN {#BM_IN#, "mode": "r"}
19+
S: SUCCESS {}
20+
C: RUN "RETURN 1 AS n" {} {}
21+
S: SUCCESS {"fields": ["n"]}
22+
{{
23+
C: PULL {"n": {"Z": "*"}, "[qid]": -1}
24+
----
25+
C: DISCARD {"n": {"Z": "*"}, "[qid]": -1}
26+
}}
27+
S: SUCCESS {"type": "r"}
28+
}}
29+
C: COMMIT
30+
S: SUCCESS {"bookmark": "#BM_OUT#"}
31+
32+
*: RESET
33+
?: GOODBYE

tests/stub/bookmarks/scripts/v4/send_and_receive_bookmark_read_tx.script

Lines changed: 0 additions & 14 deletions
This file was deleted.

tests/stub/bookmarks/scripts/v4/send_and_receive_bookmark_write_tx.script

Lines changed: 0 additions & 14 deletions
This file was deleted.

tests/stub/bookmarks/scripts/v4/send_bookmark_write_tx.script

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)