mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-06 03:50:26 +02:00
Add SQL query support in plugins
This commit is contained in:
parent
bc0d801bb7
commit
1b05d82d86
10 changed files with 110 additions and 9 deletions
|
@ -285,7 +285,7 @@ function cleanupTests (servers: ServerInfo[]) {
|
|||
return Promise.all(p)
|
||||
}
|
||||
|
||||
async function waitUntilLog (server: ServerInfo, str: string, count = 1) {
|
||||
async function waitUntilLog (server: ServerInfo, str: string, count = 1, strictCount = true) {
|
||||
const logfile = join(root(), 'test' + server.internalServerNumber, 'logs/peertube.log')
|
||||
|
||||
while (true) {
|
||||
|
@ -293,6 +293,7 @@ async function waitUntilLog (server: ServerInfo, str: string, count = 1) {
|
|||
|
||||
const matches = buf.toString().match(new RegExp(str, 'g'))
|
||||
if (matches && matches.length === count) return
|
||||
if (matches && strictCount === false && matches.length >= count) return
|
||||
|
||||
await wait(1000)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue