Dagger
Search

bats

Bash Automated Testing System

Installation

dagger install github.com/sagikazarmark/daggerverse/bats@v0.1.0

Entrypoint

Return Type
Bats !
Arguments
NameTypeDefault ValueDescription
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()
}

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
NameTypeDefault ValueDescription
sourceDirectory !-Source directory.
Example
func (m *myModule) 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
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
NameTypeDefault ValueDescription
args[String ! ] !-Arguments to pass to bats.
Example
func (m *myModule) example(source *Directory, args []string) *Container  {
	return dag.
			Bats().
			WithSource(source).
			Run(args)
}