From 3d470a530c4a48b2e4f4a9e7d4f223e14f32cea4 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 14 Jun 2021 16:52:22 +0200 Subject: Faster ci using compiled ts files --- server/tests/api/activitypub/security.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'server/tests/api/activitypub/security.ts') diff --git a/server/tests/api/activitypub/security.ts b/server/tests/api/activitypub/security.ts index 364b53e0f..61db272f6 100644 --- a/server/tests/api/activitypub/security.ts +++ b/server/tests/api/activitypub/security.ts @@ -5,6 +5,7 @@ import * as chai from 'chai' import { buildDigest } from '@server/helpers/peertube-crypto' import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' import { + buildAbsoluteFixturePath, cleanupTests, closeAllSequelize, flushAndRunMultipleServers, @@ -40,7 +41,7 @@ function setUpdatedAtOfServer (onServer: ServerInfo, ofServer: ServerInfo, updat } function getAnnounceWithoutContext (server: ServerInfo) { - const json = require('./json/peertube/announce-without-context.json') + const json = require(buildAbsoluteFixturePath('./ap-json/peertube/announce-without-context.json')) const result: typeof json = {} for (const key of Object.keys(json)) { @@ -58,8 +59,8 @@ describe('Test ActivityPub security', function () { let servers: ServerInfo[] let url: string - const keys = require('./json/peertube/keys.json') - const invalidKeys = require('./json/peertube/invalid-keys.json') + const keys = require(buildAbsoluteFixturePath('./ap-json/peertube/keys.json')) + const invalidKeys = require(buildAbsoluteFixturePath('./ap-json/peertube/invalid-keys.json')) const baseHttpSignature = () => ({ algorithm: HTTP_SIGNATURE.ALGORITHM, authorizationHeaderName: HTTP_SIGNATURE.HEADER_NAME, -- cgit v1.2.3