diff options
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 | }) |