Skip to content

Commit

Permalink
log-server: test select query limit
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinRoy committed Jan 31, 2024
1 parent 31bd9cf commit d623e83
Show file tree
Hide file tree
Showing 2 changed files with 304 additions and 132 deletions.
135 changes: 135 additions & 0 deletions packages/log-server/__tests__/__snapshots__/sqlite-store.test.ts.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`SQLiteStore#getLogs (selectQueryLimit: 2) > should return the logs in order of experimentId, runId, and ascending number 2`] = `
[
{
"experimentId": "experiment1",
"number": 1,
"runId": "run1",
"type": "log1",
"values": {
"msg": "hello",
"recipient": "Anna",
},
},
{
"experimentId": "experiment1",
"number": 2,
"runId": "run1",
"type": "log1",
"values": {
"msg": "bonjour",
"recipient": "Jo",
},
},
{
"experimentId": "experiment1",
"number": 3,
"runId": "run1",
"type": "log3",
"values": {
"foo": true,
"x": 25,
"y": 0,
},
},
{
"experimentId": "experiment1",
"number": 1,
"runId": "run2",
"type": "log1",
"values": {
"bar": null,
"message": "hola",
},
},
{
"experimentId": "experiment1",
"number": 2,
"runId": "run2",
"type": "log2",
"values": {
"foo": false,
"x": 12,
},
},
{
"experimentId": "experiment2",
"number": 1,
"runId": "run1",
"type": "log2",
"values": {
"foo": true,
"x": 25,
"y": 0,
},
},
]
`;

exports[`SQLiteStore#getLogs (selectQueryLimit: 10000) > should return the logs in order of experimentId, runId, and ascending number 2`] = `
[
{
"experimentId": "experiment1",
"number": 1,
"runId": "run1",
"type": "log1",
"values": {
"msg": "hello",
"recipient": "Anna",
},
},
{
"experimentId": "experiment1",
"number": 2,
"runId": "run1",
"type": "log1",
"values": {
"msg": "bonjour",
"recipient": "Jo",
},
},
{
"experimentId": "experiment1",
"number": 3,
"runId": "run1",
"type": "log3",
"values": {
"foo": true,
"x": 25,
"y": 0,
},
},
{
"experimentId": "experiment1",
"number": 1,
"runId": "run2",
"type": "log1",
"values": {
"bar": null,
"message": "hola",
},
},
{
"experimentId": "experiment1",
"number": 2,
"runId": "run2",
"type": "log2",
"values": {
"foo": false,
"x": 12,
},
},
{
"experimentId": "experiment2",
"number": 1,
"runId": "run1",
"type": "log2",
"values": {
"foo": true,
"x": 25,
"y": 0,
},
},
]
`;
Loading

0 comments on commit d623e83

Please sign in to comment.