1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2024-11-25 09:21:11 +02:00
pocketbase/tests/logs.go
2023-11-26 13:33:17 +02:00

36 lines
589 B
Go

package tests
func MockLogsData(app *TestApp) error {
_, err := app.LogsDB().NewQuery(`
delete from {{_logs}};
insert into {{_logs}} (
[[id]],
[[level]],
[[message]],
[[data]],
[[created]],
[[updated]]
)
values
(
"873f2133-9f38-44fb-bf82-c8f53b310d91",
0,
"test_message1",
'{"status":200}',
"2022-05-01 10:00:00.123Z",
"2022-05-01 10:00:00.123Z"
),
(
"f2133873-44fb-9f38-bf82-c918f53b310d",
8,
"test_message2",
'{"status":400}',
"2022-05-02 10:00:00.123Z",
"2022-05-02 10:00:00.123Z"
);
`).Execute()
return err
}