@testcontainers/gcloud
Version:
GCloud module for Testcontainers
37 lines (36 loc) • 1.2 kB
TypeScript
import { AbstractStartedContainer, GenericContainer, StartedTestContainer } from "testcontainers";
/**
* SpannerEmulatorContainer runs the Cloud Spanner emulator via the GCloud CLI image.
*/
export declare class SpannerEmulatorContainer extends GenericContainer {
private projectId?;
constructor(image: string);
/**
* Sets the GCP project ID to use with the emulator.
*/
withProjectId(projectId: string): this;
start(): Promise<StartedSpannerEmulatorContainer>;
}
/**
* A running Spanner emulator instance with endpoint getters and helper access.
*/
export declare class StartedSpannerEmulatorContainer extends AbstractStartedContainer {
private readonly projectId;
constructor(startedTestContainer: StartedTestContainer, projectId: string);
/**
* @returns mapped port for gRPC.
*/
getGrpcPort(): number;
/**
* @returns host:port for gRPC.
*/
getEmulatorGrpcEndpoint(): string;
/**
* @returns the GCP project ID used by the emulator.
*/
getProjectId(): string;
/**
* @returns insecure credentials for emulator.
*/
getSslCredentials(): import("@grpc/grpc-js").ChannelCredentials;
}