bats
Bash Automated Testing System
Installation
dagger install github.com/sagikazarmark/daggerverse/bats@v0.1.0
Entrypoint
Return Type
Bats !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
version | String | - | Version (image tag) to use from the official image repository as a base container. |
image | String | - | Custom image reference in "repository:tag" format to use as a base container. |
container | Container | - | Custom container to use as a base container. |
Example
func (m *myModule) example() *Bats {
return dag.
Bats()
}
Types
Bats 🔗
container() 🔗
Return Type
Container !
Example
func (m *myModule) example() *Container {
return dag.
Bats().
Container()
}
withSource() 🔗
Mount a source directory.
Return Type
WithSource !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | Source directory. |
Example
func (m *myModule) example(source *Directory) *BatsWithSource {
return dag.
Bats().
WithSource(source)
}
run() 🔗
Run bats tests.
Return Type
Container !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
args | [String ! ] ! | - | Arguments to pass to bats. |
source | Directory | - | Source directory to mount. |
Example
func (m *myModule) example(args []string) *Container {
return dag.
Bats().
Run(args)
}
WithSource 🔗
container() 🔗
Return Type
Container !
Example
func (m *myModule) example(source *Directory) *Container {
return dag.
Bats().
WithSource(source).
Container()
}
run() 🔗
Run bats tests.
Return Type
Container !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
args | [String ! ] ! | - | Arguments to pass to bats. |
Example
func (m *myModule) example(source *Directory, args []string) *Container {
return dag.
Bats().
WithSource(source).
Run(args)
}