dagger-structure-test
Testing framework to verify dagger container structureInstallation
dagger install github.com/prefapp/daggerverse/dagger-structure-test@1d9014f7406ed2afab806be9bd55e9006537a3fbEntrypoint
Return Type
DaggerStructureTest Example
dagger -m github.com/prefapp/daggerverse/dagger-structure-test@1d9014f7406ed2afab806be9bd55e9006537a3fb call \
func (m *MyModule) Example() *dagger.DaggerStructureTest {
return dag.
DaggerStructureTest()
}@function
def example() -> dagger.DaggerStructureTest:
return (
dag.dagger_structure_test()
)@func()
example(): DaggerStructureTest {
return dag
.daggerStructureTest()
}Types
DaggerStructureTest 🔗
assertOutput() 🔗
Test a container output
Return Type
Boolean !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| container | Container ! | - | No description provided |
| options | DaggerStructureTestAssertOutputOpts ! | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(ctx context.Context, container *dagger.Container, options *dagger.DaggerStructureTestAssertOutputOpts) bool {
return dag.
DaggerStructureTest().
AssertOutput(ctx, container, options)
}@function
async def example(container: dagger.Container, options: dagger.DaggerStructureTestAssertOutputOpts) -> bool:
return await (
dag.dagger_structure_test()
.assert_output(container, options)
)@func()
async example(container: Container, options: DaggerStructureTestAssertOutputOpts): Promise<boolean> {
return dag
.daggerStructureTest()
.assertOutput(container, options)
}getExitCode() 🔗
Returns a container exit code
Return Type
Integer !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ctr | Container ! | - | No description provided |
Example
dagger -m github.com/prefapp/daggerverse/dagger-structure-test@1d9014f7406ed2afab806be9bd55e9006537a3fb call \
get-exit-code --ctr IMAGE:TAGfunc (m *MyModule) Example(ctx context.Context, ctr *dagger.Container) int {
return dag.
DaggerStructureTest().
GetExitCode(ctx, ctr)
}@function
async def example(ctr: dagger.Container) -> int:
return await (
dag.dagger_structure_test()
.get_exit_code(ctr)
)@func()
async example(ctr: Container): Promise<number> {
return dag
.daggerStructureTest()
.getExitCode(ctr)
}assertFileExistence() 🔗
Return Type
Boolean !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| container | Container ! | - | No description provided |
| path | String ! | - | No description provided |
| shouldExist | Boolean ! | - | No description provided |
| options | DaggerStructureTestAssertFileExistenceOpts ! | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(ctx context.Context, container *dagger.Container, path string, shouldExist bool, options *dagger.DaggerStructureTestAssertFileExistenceOpts) bool {
return dag.
DaggerStructureTest().
AssertFileExistence(ctx, container, path, shouldExist, options)
}@function
async def example(container: dagger.Container, path: str, should_exist: bool, options: dagger.DaggerStructureTestAssertFileExistenceOpts) -> bool:
return await (
dag.dagger_structure_test()
.assert_file_existence(container, path, should_exist, options)
)@func()
async example(container: Container, path: string, shouldExist: boolean, options: DaggerStructureTestAssertFileExistenceOpts): Promise<boolean> {
return dag
.daggerStructureTest()
.assertFileExistence(container, path, shouldExist, options)
}isDir() 🔗
Return Type
Boolean !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| container | Container ! | - | No description provided |
| path | String ! | - | No description provided |
Example
dagger -m github.com/prefapp/daggerverse/dagger-structure-test@1d9014f7406ed2afab806be9bd55e9006537a3fb call \
is-dir --container IMAGE:TAG --path stringfunc (m *MyModule) Example(ctx context.Context, container *dagger.Container, path string) bool {
return dag.
DaggerStructureTest().
IsDir(ctx, container, path)
}@function
async def example(container: dagger.Container, path: str) -> bool:
return await (
dag.dagger_structure_test()
.is_dir(container, path)
)@func()
async example(container: Container, path: string): Promise<boolean> {
return dag
.daggerStructureTest()
.isDir(container, path)
}DaggerStructureTestAssertOutputOpts 🔗
expectedOutput() 🔗
Return Type
String Example
Function DaggerStructureTestAssertOutputOpts.expectedOutput is not accessible from the dagger-structure-test moduleFunction DaggerStructureTestAssertOutputOpts.expectedOutput is not accessible from the dagger-structure-test moduleFunction DaggerStructureTestAssertOutputOpts.expectedOutput is not accessible from the dagger-structure-test moduleFunction DaggerStructureTestAssertOutputOpts.expectedOutput is not accessible from the dagger-structure-test moduleexpectedError() 🔗
Return Type
String Example
Function DaggerStructureTestAssertOutputOpts.expectedError is not accessible from the dagger-structure-test moduleFunction DaggerStructureTestAssertOutputOpts.expectedError is not accessible from the dagger-structure-test moduleFunction DaggerStructureTestAssertOutputOpts.expectedError is not accessible from the dagger-structure-test moduleFunction DaggerStructureTestAssertOutputOpts.expectedError is not accessible from the dagger-structure-test moduleexpectedExitCode() 🔗
Return Type
Integer Example
Function DaggerStructureTestAssertOutputOpts.expectedExitCode is not accessible from the dagger-structure-test moduleFunction DaggerStructureTestAssertOutputOpts.expectedExitCode is not accessible from the dagger-structure-test moduleFunction DaggerStructureTestAssertOutputOpts.expectedExitCode is not accessible from the dagger-structure-test moduleFunction DaggerStructureTestAssertOutputOpts.expectedExitCode is not accessible from the dagger-structure-test moduledisableCache() 🔗
Return Type
Boolean Example
Function DaggerStructureTestAssertOutputOpts.disableCache is not accessible from the dagger-structure-test moduleFunction DaggerStructureTestAssertOutputOpts.disableCache is not accessible from the dagger-structure-test moduleFunction DaggerStructureTestAssertOutputOpts.disableCache is not accessible from the dagger-structure-test moduleFunction DaggerStructureTestAssertOutputOpts.disableCache is not accessible from the dagger-structure-test moduleDaggerStructureTestAssertFileExistenceOpts 🔗
permissions() 🔗
Return Type
String Example
Function DaggerStructureTestAssertFileExistenceOpts.permissions is not accessible from the dagger-structure-test moduleFunction DaggerStructureTestAssertFileExistenceOpts.permissions is not accessible from the dagger-structure-test moduleFunction DaggerStructureTestAssertFileExistenceOpts.permissions is not accessible from the dagger-structure-test moduleFunction DaggerStructureTestAssertFileExistenceOpts.permissions is not accessible from the dagger-structure-test moduleuid() 🔗
Return Type
Integer Example
Function DaggerStructureTestAssertFileExistenceOpts.uid is not accessible from the dagger-structure-test moduleFunction DaggerStructureTestAssertFileExistenceOpts.uid is not accessible from the dagger-structure-test moduleFunction DaggerStructureTestAssertFileExistenceOpts.uid is not accessible from the dagger-structure-test moduleFunction DaggerStructureTestAssertFileExistenceOpts.uid is not accessible from the dagger-structure-test modulegid() 🔗
Return Type
Integer Example
Function DaggerStructureTestAssertFileExistenceOpts.gid is not accessible from the dagger-structure-test moduleFunction DaggerStructureTestAssertFileExistenceOpts.gid is not accessible from the dagger-structure-test moduleFunction DaggerStructureTestAssertFileExistenceOpts.gid is not accessible from the dagger-structure-test moduleFunction DaggerStructureTestAssertFileExistenceOpts.gid is not accessible from the dagger-structure-test module