0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

fix: integration test failure (#3036)

This commit is contained in:
Charles Zhao 2023-01-31 17:49:04 +08:00 committed by GitHub
parent 14482934f6
commit 031a2c69de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -2,13 +2,14 @@ import fs from 'fs/promises';
import { createServer } from 'http'; import { createServer } from 'http';
import path from 'path'; import path from 'path';
import { mockSmsVerificationCodeFileName } from '@logto/connector-kit';
import type { User } from '@logto/schemas'; import type { User } from '@logto/schemas';
import { RequestError } from 'got'; import { RequestError } from 'got';
import { createUser } from '#src/api/index.js'; import { createUser } from '#src/api/index.js';
import { generateUsername } from '#src/utils.js'; import { generateUsername } from '#src/utils.js';
const temporaryVerificationCodeFilePath = path.join('/tmp', 'logto_mock_passcode_record.txt'); const temporaryVerificationCodeFilePath = path.join('/tmp', mockSmsVerificationCodeFileName);
export const createUserByAdmin = ( export const createUserByAdmin = (
username?: string, username?: string,

View file

@ -24,3 +24,5 @@ export const parseJson = (
throw new ConnectorError(errorCode, errorPayload ?? jsonString); throw new ConnectorError(errorCode, errorPayload ?? jsonString);
} }
}; };
export const mockSmsVerificationCodeFileName = 'logto_mock_verification_code_record.txt';