fix snapshot names

This commit is contained in:
Alex Garcia 2024-11-14 11:39:56 -08:00
parent c1055ab3f8
commit c4ece98705
2 changed files with 34 additions and 3 deletions

View file

@ -1698,7 +1698,38 @@
]),
})
# ---
# name: test_updates[1-init]
# name: test_updates[1-init-contents]
OrderedDict({
'sql': 'select * from v',
'rows': list([
OrderedDict({
'rowid': 1,
'vector': b'\x11\x11\x11\x11',
'b': 1,
'n': 1,
'f': 1.1,
't': 'test1',
}),
OrderedDict({
'rowid': 2,
'vector': b'""""',
'b': 1,
'n': 2,
'f': 2.2,
't': 'test2',
}),
OrderedDict({
'rowid': 3,
'vector': b'3333',
'b': 1,
'n': 3,
'f': 3.3,
't': '1234567890123',
}),
]),
})
# ---
# name: test_updates[1-init-shadow]
dict({
'v_chunks': OrderedDict({
'sql': 'select * from v_chunks',

View file

@ -89,8 +89,8 @@ def test_updates(db, snapshot):
exec(db, INSERT, [1, b"\x11\x11\x11\x11", 1, 1, 1.1, "test1"])
exec(db, INSERT, [2, b"\x22\x22\x22\x22", 1, 2, 2.2, "test2"])
exec(db, INSERT, [3, b"\x33\x33\x33\x33", 1, 3, 3.3, "1234567890123"])
assert exec(db, "select * from v") == snapshot(name="1-init")
assert vec0_shadow_table_contents(db, "v") == snapshot(name="1-init")
assert exec(db, "select * from v") == snapshot(name="1-init-contents")
assert vec0_shadow_table_contents(db, "v") == snapshot(name="1-init-shadow")
assert exec(
db, "UPDATE v SET b = 0, n = 11, f = 11.11, t = 'newtest1' where rowid = 1"