test
Package main provides tests for the Hello reference module.
Installation
dagger install github.com/softwaredevelop/daggerverse/hello/test@34bcf6411d3d63edac14b34277540ebc74ac4092Entrypoint
Return Type
Test Example
dagger -m github.com/softwaredevelop/daggerverse/hello/test@34bcf6411d3d63edac14b34277540ebc74ac4092 call \
func (m *MyModule) Example() *dagger.Test {
return dag.
Test()
}@function
def example() -> dagger.Test:
return (
dag.test()
)@func()
example(): Test {
return dag
.test()
}Types
Test 🔗
Test provides tests for the Hello module.
all() 🔗
All runs all tests concurrently.
Return Type
Void ! Example
dagger -m github.com/softwaredevelop/daggerverse/hello/test@34bcf6411d3d63edac14b34277540ebc74ac4092 call \
allfunc (m *MyModule) Example(ctx context.Context) {
return dag.
Test().
All(ctx)
}@function
async def example() -> None:
return await (
dag.test()
.all()
)@func()
async example(): Promise<void> {
return dag
.test()
.all()
}testCustomGreeting() 🔗
TestCustomGreeting tests the constructor options.
Return Type
Void ! Example
dagger -m github.com/softwaredevelop/daggerverse/hello/test@34bcf6411d3d63edac14b34277540ebc74ac4092 call \
test-custom-greetingfunc (m *MyModule) Example(ctx context.Context) {
return dag.
Test().
Testcustomgreeting(ctx)
}@function
async def example() -> None:
return await (
dag.test()
.testcustomgreeting()
)@func()
async example(): Promise<void> {
return dag
.test()
.testCustomGreeting()
}testMessage() 🔗
TestMessage asserts that the pure Go Message function returns the expected string.
Return Type
Void ! Example
dagger -m github.com/softwaredevelop/daggerverse/hello/test@34bcf6411d3d63edac14b34277540ebc74ac4092 call \
test-messagefunc (m *MyModule) Example(ctx context.Context) {
return dag.
Test().
Testmessage(ctx)
}@function
async def example() -> None:
return await (
dag.test()
.testmessage()
)@func()
async example(): Promise<void> {
return dag
.test()
.testMessage()
}testSay() 🔗
TestSay asserts that the container execution produces the correct stdout.
Return Type
Void ! Example
dagger -m github.com/softwaredevelop/daggerverse/hello/test@34bcf6411d3d63edac14b34277540ebc74ac4092 call \
test-sayfunc (m *MyModule) Example(ctx context.Context) {
return dag.
Test().
Testsay(ctx)
}@function
async def example() -> None:
return await (
dag.test()
.testsay()
)@func()
async example(): Promise<void> {
return dag
.test()
.testSay()
}testTerminal() 🔗
TestTerminal asserts that the returned container executes successfully.
Return Type
Void ! Example
dagger -m github.com/softwaredevelop/daggerverse/hello/test@34bcf6411d3d63edac14b34277540ebc74ac4092 call \
test-terminalfunc (m *MyModule) Example(ctx context.Context) {
return dag.
Test().
Testterminal(ctx)
}@function
async def example() -> None:
return await (
dag.test()
.testterminal()
)@func()
async example(): Promise<void> {
return dag
.test()
.testTerminal()
}testWrite() 🔗
TestWrite asserts that a valid file artifact is generated with expected contents.
Return Type
Void ! Example
dagger -m github.com/softwaredevelop/daggerverse/hello/test@34bcf6411d3d63edac14b34277540ebc74ac4092 call \
test-writefunc (m *MyModule) Example(ctx context.Context) {
return dag.
Test().
Testwrite(ctx)
}@function
async def example() -> None:
return await (
dag.test()
.testwrite()
)@func()
async example(): Promise<void> {
return dag
.test()
.testWrite()
}