diff options
author | Chocobozzz <me@florianbigard.com> | 2022-08-17 15:44:32 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-08-17 15:47:54 +0200 |
commit | 863477173efa82a4412d2e522aa46462249f9199 (patch) | |
tree | 40f0ae28691780d79acef5ba4dbd2ef0694ce8ff /server/tests/api/activitypub | |
parent | e0faa8ad6e18ce6248ef1ec93a59dab5b05be468 (diff) | |
download | PeerTube-863477173efa82a4412d2e522aa46462249f9199.tar.gz PeerTube-863477173efa82a4412d2e522aa46462249f9199.tar.zst PeerTube-863477173efa82a4412d2e522aa46462249f9199.zip |
Cleanup tests imports
Diffstat (limited to 'server/tests/api/activitypub')
-rw-r--r-- | server/tests/api/activitypub/cleaner.ts | 5 | ||||
-rw-r--r-- | server/tests/api/activitypub/client.ts | 4 | ||||
-rw-r--r-- | server/tests/api/activitypub/fetch.ts | 5 | ||||
-rw-r--r-- | server/tests/api/activitypub/refresher.ts | 1 | ||||
-rw-r--r-- | server/tests/api/activitypub/security.ts | 4 |
5 files changed, 4 insertions, 15 deletions
diff --git a/server/tests/api/activitypub/cleaner.ts b/server/tests/api/activitypub/cleaner.ts index d0a151f5c..eb6779123 100644 --- a/server/tests/api/activitypub/cleaner.ts +++ b/server/tests/api/activitypub/cleaner.ts | |||
@@ -1,7 +1,6 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import 'mocha' | 3 | import { expect } from 'chai' |
4 | import * as chai from 'chai' | ||
5 | import { wait } from '@shared/core-utils' | 4 | import { wait } from '@shared/core-utils' |
6 | import { | 5 | import { |
7 | cleanupTests, | 6 | cleanupTests, |
@@ -12,8 +11,6 @@ import { | |||
12 | waitJobs | 11 | waitJobs |
13 | } from '@shared/server-commands' | 12 | } from '@shared/server-commands' |
14 | 13 | ||
15 | const expect = chai.expect | ||
16 | |||
17 | describe('Test AP cleaner', function () { | 14 | describe('Test AP cleaner', function () { |
18 | let servers: PeerTubeServer[] = [] | 15 | let servers: PeerTubeServer[] = [] |
19 | let videoUUID1: string | 16 | let videoUUID1: string |
diff --git a/server/tests/api/activitypub/client.ts b/server/tests/api/activitypub/client.ts index b12ffe341..90c89138c 100644 --- a/server/tests/api/activitypub/client.ts +++ b/server/tests/api/activitypub/client.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import { expect } from 'chai' |
4 | import { processViewersStats } from '@server/tests/shared' | 4 | import { processViewersStats } from '@server/tests/shared' |
5 | import { HttpStatusCode, VideoPlaylistPrivacy, WatchActionObject } from '@shared/models' | 5 | import { HttpStatusCode, VideoPlaylistPrivacy, WatchActionObject } from '@shared/models' |
6 | import { | 6 | import { |
@@ -13,8 +13,6 @@ import { | |||
13 | setDefaultVideoChannel | 13 | setDefaultVideoChannel |
14 | } from '@shared/server-commands' | 14 | } from '@shared/server-commands' |
15 | 15 | ||
16 | const expect = chai.expect | ||
17 | |||
18 | describe('Test activitypub', function () { | 16 | describe('Test activitypub', function () { |
19 | let servers: PeerTubeServer[] = [] | 17 | let servers: PeerTubeServer[] = [] |
20 | let video: { id: number, uuid: string, shortUUID: string } | 18 | let video: { id: number, uuid: string, shortUUID: string } |
diff --git a/server/tests/api/activitypub/fetch.ts b/server/tests/api/activitypub/fetch.ts index cc71e82ea..4edabd1d9 100644 --- a/server/tests/api/activitypub/fetch.ts +++ b/server/tests/api/activitypub/fetch.ts | |||
@@ -1,7 +1,6 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import 'mocha' | 3 | import { expect } from 'chai' |
4 | import * as chai from 'chai' | ||
5 | import { | 4 | import { |
6 | cleanupTests, | 5 | cleanupTests, |
7 | createMultipleServers, | 6 | createMultipleServers, |
@@ -11,8 +10,6 @@ import { | |||
11 | waitJobs | 10 | waitJobs |
12 | } from '@shared/server-commands' | 11 | } from '@shared/server-commands' |
13 | 12 | ||
14 | const expect = chai.expect | ||
15 | |||
16 | describe('Test ActivityPub fetcher', function () { | 13 | describe('Test ActivityPub fetcher', function () { |
17 | let servers: PeerTubeServer[] | 14 | let servers: PeerTubeServer[] |
18 | 15 | ||
diff --git a/server/tests/api/activitypub/refresher.ts b/server/tests/api/activitypub/refresher.ts index bb81d4565..401a09090 100644 --- a/server/tests/api/activitypub/refresher.ts +++ b/server/tests/api/activitypub/refresher.ts | |||
@@ -1,6 +1,5 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import 'mocha' | ||
4 | import { wait } from '@shared/core-utils' | 3 | import { wait } from '@shared/core-utils' |
5 | import { HttpStatusCode, VideoPlaylistPrivacy } from '@shared/models' | 4 | import { HttpStatusCode, VideoPlaylistPrivacy } from '@shared/models' |
6 | import { | 5 | import { |
diff --git a/server/tests/api/activitypub/security.ts b/server/tests/api/activitypub/security.ts index 5e29b744f..423fefb10 100644 --- a/server/tests/api/activitypub/security.ts +++ b/server/tests/api/activitypub/security.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import { expect } from 'chai' |
4 | import { buildDigest } from '@server/helpers/peertube-crypto' | 4 | import { buildDigest } from '@server/helpers/peertube-crypto' |
5 | import { HTTP_SIGNATURE } from '@server/initializers/constants' | 5 | import { HTTP_SIGNATURE } from '@server/initializers/constants' |
6 | import { activityPubContextify } from '@server/lib/activitypub/context' | 6 | import { activityPubContextify } from '@server/lib/activitypub/context' |
@@ -10,8 +10,6 @@ import { buildAbsoluteFixturePath, wait } from '@shared/core-utils' | |||
10 | import { HttpStatusCode } from '@shared/models' | 10 | import { HttpStatusCode } from '@shared/models' |
11 | import { cleanupTests, createMultipleServers, killallServers, PeerTubeServer } from '@shared/server-commands' | 11 | import { cleanupTests, createMultipleServers, killallServers, PeerTubeServer } from '@shared/server-commands' |
12 | 12 | ||
13 | const expect = chai.expect | ||
14 | |||
15 | function setKeysOfServer (onServer: PeerTubeServer, ofServer: PeerTubeServer, publicKey: string, privateKey: string) { | 13 | function setKeysOfServer (onServer: PeerTubeServer, ofServer: PeerTubeServer, publicKey: string, privateKey: string) { |
16 | const url = 'http://localhost:' + ofServer.port + '/accounts/peertube' | 14 | const url = 'http://localhost:' + ofServer.port + '/accounts/peertube' |
17 | 15 | ||