UNPKG

@microtica/mocks

Version:

Mock services for automated tests

47 lines (46 loc) 1.13 kB
/** * Runs localstack in Docker * https://github.com/localstack/localstack * * @export * @class Localstack */ export declare class LocalStackDocker { private readonly docker; /** * Creates an instance of LocalStackDocker. * This is kinda magical operation since it overrides the AWS endpoints for S3, DynamoDB and etc. with localhost * * @memberof LocalStackDocker */ constructor(); /** * Services which localstack supports * * @returns {string[]} list of mocked services * @memberof LocalStackDocker */ getMockedServices(): string[]; /** * Constructs URL(http://localhost:<port>) with the given port * * @private * @param {number} port the TCP port * @returns * @memberof LocalStackDocker */ private getURL; /** * Spins a new container if it's not already running * * @returns {Promise<void>} * @memberof LocalStackDocker */ start(): Promise<void>; /** * Stops the container if it's runningw * * @memberof LocalStackDocker */ stop(): Promise<void>; }