import { Port } from "./port" ; import { PullPolicy } from "./pull-policy" ; import { WaitStrategy } from "./wait-strategy" ; import { Readable } from "stream" ; import { BindMode , Command , ContainerName , Dir , EnvKey , EnvValue , ExecResult , ExtraHost , Host , Id , NetworkMode , TmpFs , } from "./docker/types" ; export interface TestContainer { start ( ) : Promise < StartedTestContainer > ; withEnv ( key , value ) : this ; withCmd ( cmd ) : this ; withTmpFs ( tmpFs ) : this ; withExposedPorts ( ... ports ) : this ; withBindMount ( source , target , bindMode ) : this ; withWaitStrategy ( waitStrategy ) : this ; withStartupTimeout ( startupTimeout ) : this ; withNetworkMode ( networkMode ) : this ; withExtraHosts ( ... extraHosts ) : this ; withDefaultLogDriver ( ) : this ; withPrivilegedMode ( ) : this ; withUser ( user ) : this ; withPullPolicy ( pullPolicy ) : this ; withCopyFileToContainer ( sourcePath , containerPath ) : this ; withCopyContentToContainer ( content , containerPath ) : this ; } export interface StopOptions { timeout : number ; removeVolumes : boolean ; } export interface StartedTestContainer { stop ( options ? ) : Promise < StoppedTestContainer > ; getHost ( ) : Host ; getMappedPort ( port ) : Port ; getName ( ) : ContainerName ; getId ( ) : Id ; getNetworkNames ( ) : string [ ] ; getNetworkId ( networkName ) : string ; getIpAddress ( networkName ) : string ; exec ( command ) : Promise < ExecResult > ; logs ( ) : Promise < Readable > ; } export interface StoppedTestContainer { }