import 'mocha'
import { expect } from 'chai'
-import { HttpStatusCode, randomInt } from '@shared/core-utils'
+import { FIXTURE_URLS } from '@server/tests/shared'
+import { randomInt } from '@shared/core-utils'
+import { HttpStatusCode, VideoImportState, VideoPrivacy } from '@shared/models'
import {
cleanupTests,
createSingleServer,
- ImportsCommand,
PeerTubeServer,
setAccessTokensToServers,
setDefaultVideoChannel,
VideosCommand,
waitJobs
-} from '@shared/extra-utils'
-import { VideoImportState, VideoPrivacy } from '@shared/models'
+} from '@shared/server-commands'
describe('Test upload quota', function () {
let server: PeerTubeServer
})
it('Should fail to import with HTTP/Torrent/magnet', async function () {
- this.timeout(120000)
+ this.timeout(120_000)
const baseAttributes = {
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 ])