aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/activitypub
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-08-17 15:44:32 +0200
committerChocobozzz <me@florianbigard.com>2022-08-17 15:47:54 +0200
commit863477173efa82a4412d2e522aa46462249f9199 (patch)
tree40f0ae28691780d79acef5ba4dbd2ef0694ce8ff /server/tests/api/activitypub
parente0faa8ad6e18ce6248ef1ec93a59dab5b05be468 (diff)
downloadPeerTube-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.ts5
-rw-r--r--server/tests/api/activitypub/client.ts4
-rw-r--r--server/tests/api/activitypub/fetch.ts5
-rw-r--r--server/tests/api/activitypub/refresher.ts1
-rw-r--r--server/tests/api/activitypub/security.ts4
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
3import 'mocha' 3import { expect } from 'chai'
4import * as chai from 'chai'
5import { wait } from '@shared/core-utils' 4import { wait } from '@shared/core-utils'
6import { 5import {
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
15const expect = chai.expect
16
17describe('Test AP cleaner', function () { 14describe('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
3import * as chai from 'chai' 3import { expect } from 'chai'
4import { processViewersStats } from '@server/tests/shared' 4import { processViewersStats } from '@server/tests/shared'
5import { HttpStatusCode, VideoPlaylistPrivacy, WatchActionObject } from '@shared/models' 5import { HttpStatusCode, VideoPlaylistPrivacy, WatchActionObject } from '@shared/models'
6import { 6import {
@@ -13,8 +13,6 @@ import {
13 setDefaultVideoChannel 13 setDefaultVideoChannel
14} from '@shared/server-commands' 14} from '@shared/server-commands'
15 15
16const expect = chai.expect
17
18describe('Test activitypub', function () { 16describe('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
3import 'mocha' 3import { expect } from 'chai'
4import * as chai from 'chai'
5import { 4import {
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
14const expect = chai.expect
15
16describe('Test ActivityPub fetcher', function () { 13describe('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
3import 'mocha'
4import { wait } from '@shared/core-utils' 3import { wait } from '@shared/core-utils'
5import { HttpStatusCode, VideoPlaylistPrivacy } from '@shared/models' 4import { HttpStatusCode, VideoPlaylistPrivacy } from '@shared/models'
6import { 5import {
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
3import * as chai from 'chai' 3import { expect } from 'chai'
4import { buildDigest } from '@server/helpers/peertube-crypto' 4import { buildDigest } from '@server/helpers/peertube-crypto'
5import { HTTP_SIGNATURE } from '@server/initializers/constants' 5import { HTTP_SIGNATURE } from '@server/initializers/constants'
6import { activityPubContextify } from '@server/lib/activitypub/context' 6import { activityPubContextify } from '@server/lib/activitypub/context'
@@ -10,8 +10,6 @@ import { buildAbsoluteFixturePath, wait } from '@shared/core-utils'
10import { HttpStatusCode } from '@shared/models' 10import { HttpStatusCode } from '@shared/models'
11import { cleanupTests, createMultipleServers, killallServers, PeerTubeServer } from '@shared/server-commands' 11import { cleanupTests, createMultipleServers, killallServers, PeerTubeServer } from '@shared/server-commands'
12 12
13const expect = chai.expect
14
15function setKeysOfServer (onServer: PeerTubeServer, ofServer: PeerTubeServer, publicKey: string, privateKey: string) { 13function 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