bats
Bash Automated Testing System
Installation
dagger install github.com/luanmtruong/daggerverse/bats@96c13b929c636316317f745ff36cda4e4c66f680Entrypoint
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. |
| container | Container | - | Custom container to use as a base container. |
Example
dagger -m github.com/luanmtruong/daggerverse/bats@96c13b929c636316317f745ff36cda4e4c66f680 call \
func (m *MyModule) Example() *dagger.Bats {
return dag.
Bats()
}@function
def example() -> dagger.Bats:
return (
dag.bats()
)@func()
example(): Bats {
return dag
.bats()
}Types
Bats 🔗
withSource() 🔗
Mount a source directory.
Return Type
WithSource !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | Source directory. |
Example
dagger -m github.com/luanmtruong/daggerverse/bats@96c13b929c636316317f745ff36cda4e4c66f680 call \
with-source --source DIR_PATHfunc (m *MyModule) Example(source *dagger.Directory) *dagger.BatsWithSource {
return dag.
Bats().
WithSource(source)
}@function
def example(source: dagger.Directory) -> dagger.BatsWithSource:
return (
dag.bats()
.with_source(source)
)@func()
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
dagger -m github.com/luanmtruong/daggerverse/bats@96c13b929c636316317f745ff36cda4e4c66f680 call \
run --args string1 --args string2func (m *MyModule) Example(args []string) *dagger.Container {
return dag.
Bats().
Run(args)
}@function
def example(args: List[str]) -> dagger.Container:
return (
dag.bats()
.run(args)
)@func()
example(args: string[]): Container {
return dag
.bats()
.run(args)
}WithSource 🔗
run() 🔗
Run bats tests.
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| args | [String ! ] ! | - | Arguments to pass to bats. |
Example
dagger -m github.com/luanmtruong/daggerverse/bats@96c13b929c636316317f745ff36cda4e4c66f680 call \
with-source --source DIR_PATH \
run --args string1 --args string2func (m *MyModule) Example(source *dagger.Directory, args []string) *dagger.Container {
return dag.
Bats().
WithSource(source).
Run(args)
}@function
def example(source: dagger.Directory, args: List[str]) -> dagger.Container:
return (
dag.bats()
.with_source(source)
.run(args)
)@func()
example(source: Directory, args: string[]): Container {
return dag
.bats()
.withSource(source)
.run(args)
}