We shouldn't use server/tests/utils which are intended for tests inside of server/tools scripts.
We should keep tests for tests and tools for tools, maybe we can move some of this functionality to shared since it's shared between tools and tests.
example 1 server/tools/peertube-get-access-token.ts:
import {
getClient,
serverLogin,
Server,
Client,
User
} from '../tests/utils/index'
example 2 server/tools/peertube-import-videos.ts:
import { getClient, getVideoCategories, login, searchVideoWithSort, uploadVideo } from '../tests/utils'
example 3 server/tools/peertube-upload.ts:
import { uploadVideo } from '../tests/utils/index'
All these need to move to shared/ so that we don't use utils intended for tests inside of tools.
Hey can i take this? Thanks!
@buoyantair You can probably take the issue - unless OP is already working on it ? In the meantime I'm assigning it to you then :)
I've been busy with other stuff, go ahead please solve it
@rigelk I made the PR ^ But I have some issues with testing async functions I guess. Can you look into it?
Guys?
@buoyantair I don't have time to review your PR right now - will do tomorrow