/** * Identifies a specific profile+region combination in which tests are executed */ export interface TestEnvironment { /** * The AWS profile used for the environment * * @default - default credentials */ readonly profile?: string; /** * The AWS region of the environment */ readonly region: string; /** * The AWS account of the environment, if known * * The account is usually only discovered once a test has run in the * environment, e.g. from a bootstrap error. * * @default - account is not known */ readonly account?: string; } /** * An environment that was removed from the pool, and why */ export interface RemovedEnvironment extends TestEnvironment { /** * Human-readable reason for the removal */ readonly reason: string; } /** * Summary of the state of the environment pool */ export interface EnvironmentSummary { /** * Environments that were removed from the pool during the test run */ readonly removed: RemovedEnvironment[]; } /** * Tracks which test environments (profile+region combinations) are still * usable during an integration test run. * * When a test discovers that an environment is unusable (e.g. it is not * bootstrapped), the environment is removed from the pool so no further * tests are scheduled there, and the removal is recorded for reporting. */ export declare class EnvironmentPool { private readonly available; private readonly removed; constructor(environments: TestEnvironment[]); /** * Whether the given environment is still available for running tests */ isAvailable(env: TestEnvironment): boolean; /** * Whether any environment is still available for running tests */ hasAvailable(): boolean; /** * Remove an environment from the pool * * Only known, still-available environments are removed; removing the same * environment twice keeps the first removal record. * * @returns `true` if the environment was available and has now been removed */ remove(env: TestEnvironment, reason: string): boolean; /** * Summary of removed environments, for end-of-run reporting */ summary(): EnvironmentSummary; } //# sourceMappingURL=environment-pool.d.ts.map