@testcontainers/gcloud
Version:
GCloud module for Testcontainers
30 lines (29 loc) • 1.36 kB
TypeScript
import type { StartedTestContainer } from "testcontainers";
import { AbstractStartedContainer, GenericContainer } from "testcontainers";
export declare class CloudStorageEmulatorContainer extends GenericContainer {
private _externalURL?;
private _publicHost?;
private autoUpdateExternalUrl;
constructor(image: string);
withExternalURL(url: string): CloudStorageEmulatorContainer;
withPublicHost(host: string): CloudStorageEmulatorContainer;
withAutoUpdateExternalUrl(autoUpdateExternalUrl: boolean): this;
start(): Promise<StartedCloudStorageEmulatorContainer>;
}
export declare class StartedCloudStorageEmulatorContainer extends AbstractStartedContainer {
private _externalURL?;
private _publicHost?;
constructor(startedTestContainer: StartedTestContainer, externalURL?: string, publicHost?: string);
updateExternalUrl(url: string): Promise<void>;
updatePublicHost(host: string): Promise<void>;
getEmulatorEndpoint(): string;
/**
* Sends a PUT request to the fake-gcs-server to update the server configuration for externalUrl and publicHost.
*/
private processServerConfigChange;
/**
* @return a <code>host:port</code> pair corresponding to the address on which the emulator is
* reachable from the test host machine.
*/
getExternalUrl(): string | undefined;
}