bats
Bash Automated Testing System
Installation
dagger install github.com/jedevc/daggerverse-sagikazarmark/bats@a104424df38ca8b0b758f699dcfeeb0c2210cc2e
Entrypoint
Return Type
Bats !
Arguments
Name | Type | 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/jedevc/daggerverse-sagikazarmark/bats@a104424df38ca8b0b758f699dcfeeb0c2210cc2e call \
func (m *myModule) example() *Bats {
return dag.
Bats()
}
@function
def example() -> dag.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/jedevc/daggerverse-sagikazarmark/bats@a104424df38ca8b0b758f699dcfeeb0c2210cc2e call \
with-source --source DIR_PATH
func (m *myModule) example(source *Directory) *BatsWithSource {
return dag.
Bats().
WithSource(source)
}
@function
def example(source: dagger.Directory) -> dag.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/jedevc/daggerverse-sagikazarmark/bats@a104424df38ca8b0b758f699dcfeeb0c2210cc2e call \
run --args string1 --args string2
func (m *myModule) example(args []string) *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/jedevc/daggerverse-sagikazarmark/bats@a104424df38ca8b0b758f699dcfeeb0c2210cc2e call \
with-source --source DIR_PATH \
run --args string1 --args string2
func (m *myModule) example(source *Directory, args []string) *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)
}