testcontainers
No long description provided.
Installation
dagger install github.com/vito/daggerverse/testcontainers@a1647750b3ef09b83091b40185f498bb995ed540
Entrypoint
Return Type
Testcontainers
Example
dagger -m github.com/vito/daggerverse/testcontainers@a1647750b3ef09b83091b40185f498bb995ed540 call \
func (m *myModule) example() *Testcontainers {
return dag.
Testcontainers()
}
@function
def example() -> dag.Testcontainers:
return (
dag.testcontainers()
)
@func()
example(): Testcontainers {
return dag
.testcontainers()
}
Types
Testcontainers 🔗
Testcontainers provides a simple interface for wrapping an existing test suite that uses Testcontainers.
docker() 🔗
Return Type
Service !
Example
dagger -m github.com/vito/daggerverse/testcontainers@a1647750b3ef09b83091b40185f498bb995ed540 call \
docker
func (m *myModule) example() *Service {
return dag.
Testcontainers().
Docker()
}
@function
def example() -> dagger.Service:
return (
dag.testcontainers()
.docker()
)
@func()
example(): Service {
return dag
.testcontainers()
.docker()
}
withDocker() 🔗
WithDocker allows you to override the Docker daemon used by Testcontainers.
Return Type
Testcontainers !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
docker | Service ! | - | No description provided |
Example
dagger -m github.com/vito/daggerverse/testcontainers@a1647750b3ef09b83091b40185f498bb995ed540 call \
with-docker --docker PROTOCOL://HOST:PORT
func (m *myModule) example(docker *Service) *Testcontainers {
return dag.
Testcontainers().
WithDocker(docker)
}
@function
def example(docker: dagger.Service) -> dag.Testcontainers:
return (
dag.testcontainers()
.with_docker(docker)
)
@func()
example(docker: Service): Testcontainers {
return dag
.testcontainers()
.withDocker(docker)
}
dockerService() 🔗
DockerService exposes the Docker service so that you can start it before running a bunch of test suites, keeping it around across the full run even if there is excessive idle time due to load.
Return Type
Service !
Example
dagger -m github.com/vito/daggerverse/testcontainers@a1647750b3ef09b83091b40185f498bb995ed540 call \
docker-service
func (m *myModule) example() *Service {
return dag.
Testcontainers().
DockerService()
}
@function
def example() -> dagger.Service:
return (
dag.testcontainers()
.docker_service()
)
@func()
example(): Service {
return dag
.testcontainers()
.dockerService()
}
setup() 🔗
Setup attaches a Docker daemon to the container and points Testcontainers to it.
Return Type
Container !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
ctr | Container ! | - | No description provided |
Example
dagger -m github.com/vito/daggerverse/testcontainers@a1647750b3ef09b83091b40185f498bb995ed540 call \
setup --ctr IMAGE:TAG
func (m *myModule) example(ctr *Container) *Container {
return dag.
Testcontainers().
Setup(ctr)
}
@function
def example(ctr: dagger.Container) -> dagger.Container:
return (
dag.testcontainers()
.setup(ctr)
)
@func()
example(ctr: Container): Container {
return dag
.testcontainers()
.setup(ctr)
}