From 1f6125be8b6306ba34b5ad9df985df462ef9759c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 18 Aug 2021 09:14:51 +0200 Subject: Optimize torrent URL update --- shared/extra-utils/miscs/checks.ts | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'shared/extra-utils/miscs/checks.ts') diff --git a/shared/extra-utils/miscs/checks.ts b/shared/extra-utils/miscs/checks.ts index aa2c8e8fa..b1be214b1 100644 --- a/shared/extra-utils/miscs/checks.ts +++ b/shared/extra-utils/miscs/checks.ts @@ -20,6 +20,12 @@ function expectStartWith (str: string, start: string) { expect(str.startsWith(start), `${str} does not start with ${start}`).to.be.true } +async function expectLogDoesNotContain (server: PeerTubeServer, str: string) { + const content = await server.servers.getLogContent() + + expect(content.toString()).to.not.contain(str) +} + async function testImage (url: string, imageName: string, imagePath: string, extension = '.jpg') { const res = await makeGetRequest({ url, @@ -46,6 +52,7 @@ async function testFileExistsOrNot (server: PeerTubeServer, directory: string, f export { dateIsValid, testImage, + expectLogDoesNotContain, testFileExistsOrNot, expectStartWith } -- cgit v1.2.3