Dagger
Search

bats

Bash Automated Testing System

Installation

dagger install github.com/sagikazarmark/daggerverse/bats@833905febeb1c77937712dd9f69a2c85898c74d9

Entrypoint

Return Type
Bats !
Arguments
NameTypeDescription
versionString Version (image tag) to use from the official image repository as a base container.
imageString Custom image reference in "repository:tag" format to use as a base container.
containerContainer Custom container to use as a base container.
Example
func (m *myModule) example() *Bats  {
	return dag.
			Bats()
}
@function
def example() -> dag.Bats:
	return (
		dag.bats()
	)
@func()
example(): Bats {
	return dag
		.bats()
}

Types

Bats

container()

Return Type
Container !
Example
dagger -m github.com/sagikazarmark/daggerverse/bats@833905febeb1c77937712dd9f69a2c85898c74d9 call \
 container
func (m *myModule) example() *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
NameTypeDefault ValueDescription
sourceDirectory !-Source directory.
Example
dagger -m github.com/sagikazarmark/daggerverse/bats@833905febeb1c77937712dd9f69a2c85898c74d9 call \
 with-source --source DIR_PATH \
 container
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
NameTypeDefault ValueDescription
args[String ! ] !-Arguments to pass to bats.
sourceDirectory -Source directory to mount.
Example
dagger -m github.com/sagikazarmark/daggerverse/bats@833905febeb1c77937712dd9f69a2c85898c74d9 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

container()

Return Type
Container !
Example
dagger -m github.com/sagikazarmark/daggerverse/bats@833905febeb1c77937712dd9f69a2c85898c74d9 call \
 with-source --source DIR_PATH \
 container
func (m *myModule) example(source *Directory) *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
NameTypeDefault ValueDescription
args[String ! ] !-Arguments to pass to bats.
Example
dagger -m github.com/sagikazarmark/daggerverse/bats@833905febeb1c77937712dd9f69a2c85898c74d9 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)
}