bats
Bash Automated Testing System
Installation
dagger install github.com/sagikazarmark/daggerverse/bats@v0.1.0Entrypoint
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
dagger -m github.com/sagikazarmark/daggerverse/bats@24c022dde505b24970824dd50f51e719098cfeb3 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 🔗
container() 🔗
Return Type
Container ! Example
dagger -m github.com/sagikazarmark/daggerverse/bats@24c022dde505b24970824dd50f51e719098cfeb3 call \
containerfunc (m *MyModule) Example() *dagger.Container {
return dag.
Bats().
Container()
}@function
def example() -> dagger.Container:
return (
dag.bats()
.container()
)@func()
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
dagger -m github.com/sagikazarmark/daggerverse/bats@24c022dde505b24970824dd50f51e719098cfeb3 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/sagikazarmark/daggerverse/bats@24c022dde505b24970824dd50f51e719098cfeb3 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 🔗
container() 🔗
Return Type
Container ! Example
dagger -m github.com/sagikazarmark/daggerverse/bats@24c022dde505b24970824dd50f51e719098cfeb3 call \
with-source --source DIR_PATH \
containerfunc (m *MyModule) Example(source *dagger.Directory) *dagger.Container {
return dag.
Bats().
WithSource(source).
Container()
}@function
def example(source: dagger.Directory) -> dagger.Container:
return (
dag.bats()
.with_source(source)
.container()
)@func()
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
dagger -m github.com/sagikazarmark/daggerverse/bats@24c022dde505b24970824dd50f51e719098cfeb3 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)
}