diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-05 16:37:50 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:16 +0200 |
commit | 329619b3453479f76c049816b7403b86e9d45cb5 (patch) | |
tree | e522940946402a4284d356f2cde8e0dcbe29b289 /server/tests/cli/reset-password.ts | |
parent | a6a79eae0d8564099b6957e76d7a18528d9ef124 (diff) | |
download | PeerTube-329619b3453479f76c049816b7403b86e9d45cb5.tar.gz PeerTube-329619b3453479f76c049816b7403b86e9d45cb5.tar.zst PeerTube-329619b3453479f76c049816b7403b86e9d45cb5.zip |
Introduce CLI command
Diffstat (limited to 'server/tests/cli/reset-password.ts')
-rw-r--r-- | server/tests/cli/reset-password.ts | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/server/tests/cli/reset-password.ts b/server/tests/cli/reset-password.ts index a84463b33..97a6eae15 100644 --- a/server/tests/cli/reset-password.ts +++ b/server/tests/cli/reset-password.ts | |||
@@ -1,16 +1,14 @@ | |||
1 | import 'mocha' | 1 | import 'mocha' |
2 | 2 | import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' | |
3 | import { | 3 | import { |
4 | cleanupTests, | 4 | cleanupTests, |
5 | CLICommand, | ||
5 | createUser, | 6 | createUser, |
6 | execCLI, | ||
7 | flushAndRunServer, | 7 | flushAndRunServer, |
8 | getEnvCli, | ||
9 | login, | 8 | login, |
10 | ServerInfo, | 9 | ServerInfo, |
11 | setAccessTokensToServers | 10 | setAccessTokensToServers |
12 | } from '../../../shared/extra-utils' | 11 | } from '../../../shared/extra-utils' |
13 | import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' | ||
14 | 12 | ||
15 | describe('Test reset password scripts', function () { | 13 | describe('Test reset password scripts', function () { |
16 | let server: ServerInfo | 14 | let server: ServerInfo |
@@ -26,8 +24,8 @@ describe('Test reset password scripts', function () { | |||
26 | it('Should change the user password from CLI', async function () { | 24 | it('Should change the user password from CLI', async function () { |
27 | this.timeout(60000) | 25 | this.timeout(60000) |
28 | 26 | ||
29 | const env = getEnvCli(server) | 27 | const env = server.cliCommand.getEnv() |
30 | await execCLI(`echo coucou | ${env} npm run reset-password -- -u user_1`) | 28 | await CLICommand.exec(`echo coucou | ${env} npm run reset-password -- -u user_1`) |
31 | 29 | ||
32 | await login(server.url, server.client, { username: 'user_1', password: 'coucou' }, HttpStatusCode.OK_200) | 30 | await login(server.url, server.client, { username: 'user_1', password: 'coucou' }, HttpStatusCode.OK_200) |
33 | }) | 31 | }) |