From 92e07c3b5d9dbf2febedb1b5b87ec676eb6d1ac8 Mon Sep 17 00:00:00 2001 From: buoyantair Date: Fri, 16 Nov 2018 02:51:26 +0530 Subject: Fix dependency errors between modules --- server/tests/api/activitypub/client.ts | 2 +- server/tests/api/activitypub/fetch.ts | 4 ++-- server/tests/api/activitypub/helpers.ts | 2 +- server/tests/api/activitypub/security.ts | 11 ++++++++++- server/tests/api/server/no-client.ts | 4 ++-- 5 files changed, 16 insertions(+), 7 deletions(-) (limited to 'server/tests/api') diff --git a/server/tests/api/activitypub/client.ts b/server/tests/api/activitypub/client.ts index 334cd4e5c..d45232c8d 100644 --- a/server/tests/api/activitypub/client.ts +++ b/server/tests/api/activitypub/client.ts @@ -9,7 +9,7 @@ import { runServer, ServerInfo, setAccessTokensToServers -} from '../../shared/utils' +} from '../../../../shared/utils' const expect = chai.expect diff --git a/server/tests/api/activitypub/fetch.ts b/server/tests/api/activitypub/fetch.ts index a42c606c6..e84eb18bb 100644 --- a/server/tests/api/activitypub/fetch.ts +++ b/server/tests/api/activitypub/fetch.ts @@ -13,10 +13,10 @@ import { setAccessTokensToServers, uploadVideo, userLogin -} from '../../utils' +} from '../../../../shared/utils' import * as chai from 'chai' import { setActorField, setVideoField } from '../../utils/miscs/sql' -import { waitJobs } from '../../utils/server/jobs' +import { waitJobs } from '../../../../shared/utils/server/jobs' import { Video } from '../../../../shared/models/videos' const expect = chai.expect diff --git a/server/tests/api/activitypub/helpers.ts b/server/tests/api/activitypub/helpers.ts index 610846247..4c42f3d67 100644 --- a/server/tests/api/activitypub/helpers.ts +++ b/server/tests/api/activitypub/helpers.ts @@ -2,7 +2,7 @@ import 'mocha' import { expect } from 'chai' -import { buildRequestStub } from '../../utils' +import { buildRequestStub } from '../../utils/miscs/stubs' import { isHTTPSignatureVerified, isJsonLDSignatureVerified, parseHTTPSignature } from '../../../helpers/peertube-crypto' import { cloneDeep } from 'lodash' import { buildSignedActivity } from '../../../helpers/activitypub' diff --git a/server/tests/api/activitypub/security.ts b/server/tests/api/activitypub/security.ts index e7899bb14..69b7c0148 100644 --- a/server/tests/api/activitypub/security.ts +++ b/server/tests/api/activitypub/security.ts @@ -2,7 +2,16 @@ import 'mocha' -import { flushAndRunMultipleServers, flushTests, killallServers, makePOSTAPRequest, makeFollowRequest, ServerInfo } from '../../utils' +import { + flushAndRunMultipleServers, + flushTests, + killallServers, + ServerInfo +} from '../../../../shared/utils' +import { + makePOSTAPRequest, + makeFollowRequest, +} from '../../utils/requests/activitypub' import { HTTP_SIGNATURE } from '../../../initializers' import { buildDigest, buildGlobalHeaders } from '../../../lib/job-queue/handlers/utils/activitypub-http-utils' import * as chai from 'chai' diff --git a/server/tests/api/server/no-client.ts b/server/tests/api/server/no-client.ts index 6d6ce8532..3b95ce945 100644 --- a/server/tests/api/server/no-client.ts +++ b/server/tests/api/server/no-client.ts @@ -4,8 +4,8 @@ import { flushTests, killallServers, ServerInfo -} from '../../utils/index' -import { runServer } from '../../utils/server/servers' +} from '../../../../shared/utils' +import { runServer } from '../../../../shared/utils/server/servers' describe('Start and stop server without web client routes', function () { let server: ServerInfo -- cgit v1.2.3