import 'mocha'
import { expect } from 'chai'
-import { HttpStatusCode, randomInt } from '@shared/core-utils'
+import { randomInt } from '@shared/core-utils'
import {
cleanupTests,
- flushAndRunServer,
- ImportsCommand,
- ServerInfo,
+ createSingleServer,
+ FIXTURE_URLS,
+ PeerTubeServer,
setAccessTokensToServers,
setDefaultVideoChannel,
VideosCommand,
waitJobs
} from '@shared/extra-utils'
-import { VideoImportState, VideoPrivacy } from '@shared/models'
+import { HttpStatusCode, VideoImportState, VideoPrivacy } from '@shared/models'
describe('Test upload quota', function () {
- let server: ServerInfo
+ let server: PeerTubeServer
let rootId: number
let command: VideosCommand
before(async function () {
this.timeout(30000)
- server = await flushAndRunServer(1)
+ server = await createSingleServer(1)
await setAccessTokensToServers([ server ])
await setDefaultVideoChannel([ server ])
channelId: server.store.channel.id,
privacy: VideoPrivacy.PUBLIC
}
- await server.imports.importVideo({ attributes: { ...baseAttributes, targetUrl: ImportsCommand.getGoodVideoUrl() } })
- await server.imports.importVideo({ attributes: { ...baseAttributes, magnetUri: ImportsCommand.getMagnetURI() } })
+ await server.imports.importVideo({ attributes: { ...baseAttributes, targetUrl: FIXTURE_URLS.goodVideo } })
+ await server.imports.importVideo({ attributes: { ...baseAttributes, magnetUri: FIXTURE_URLS.magnet } })
await server.imports.importVideo({ attributes: { ...baseAttributes, torrentfile: 'video-720p.torrent' as any } })
await waitJobs([ server ])