Dagger
Search

dagger-structure-test

Testing framework to verify dagger container structure

Installation

dagger install github.com/prefapp/daggerverse/dagger-structure-test@1d9014f7406ed2afab806be9bd55e9006537a3fb

Entrypoint

Return Type
DaggerStructureTest
Example
dagger -m github.com/prefapp/daggerverse/dagger-structure-test@1d9014f7406ed2afab806be9bd55e9006537a3fb call \
func (m *myModule) example() *DaggerStructureTest  {
	return dag.
			DaggerStructureTest()
}
@function
def example() -> dag.DaggerStructureTest:
	return (
		dag.dagger_structure_test()
	)
@func()
example(): DaggerStructureTest {
	return dag
		.daggerStructureTest()
}

Types

DaggerStructureTest 🔗

assertOutput() 🔗

Test a container output

Return Type
Boolean !
Arguments
NameTypeDefault ValueDescription
containerContainer !-No description provided
optionsDaggerStructureTestAssertOutputOpts !-No description provided
Example
echo 'Custom types are not supported in shell examples'
func (m *myModule) example(ctx context.Context, container *Container, options *DaggerStructureTestAssertOutputOpts) bool  {
	return dag.
			DaggerStructureTest().
			AssertOutput(ctx, container, options)
}
@function
async def example(container: dagger.Container, options: dag.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
NameTypeDefault ValueDescription
ctrContainer !-No description provided
Example
dagger -m github.com/prefapp/daggerverse/dagger-structure-test@1d9014f7406ed2afab806be9bd55e9006537a3fb call \
 get-exit-code --ctr IMAGE:TAG
func (m *myModule) example(ctx context.Context, ctr *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
NameTypeDefault ValueDescription
containerContainer !-No description provided
pathString !-No description provided
shouldExistBoolean !-No description provided
optionsDaggerStructureTestAssertFileExistenceOpts !-No description provided
Example
echo 'Custom types are not supported in shell examples'
func (m *myModule) example(ctx context.Context, container *Container, path string, shouldExist bool, options *DaggerStructureTestAssertFileExistenceOpts) bool  {
	return dag.
			DaggerStructureTest().
			AssertFileExistence(ctx, container, path, shouldExist, options)
}
@function
async def example(container: dagger.Container, path: str, should_exist: bool, options: dag.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
NameTypeDefault ValueDescription
containerContainer !-No description provided
pathString !-No description provided
Example
dagger -m github.com/prefapp/daggerverse/dagger-structure-test@1d9014f7406ed2afab806be9bd55e9006537a3fb call \
 is-dir --container IMAGE:TAG --path string
func (m *myModule) example(ctx context.Context, container *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 module
Function DaggerStructureTestAssertOutputOpts.expectedOutput is not accessible from the dagger-structure-test module
Function DaggerStructureTestAssertOutputOpts.expectedOutput is not accessible from the dagger-structure-test module
Function DaggerStructureTestAssertOutputOpts.expectedOutput is not accessible from the dagger-structure-test module

expectedError() 🔗

Return Type
String 
Example
Function DaggerStructureTestAssertOutputOpts.expectedError is not accessible from the dagger-structure-test module
Function DaggerStructureTestAssertOutputOpts.expectedError is not accessible from the dagger-structure-test module
Function DaggerStructureTestAssertOutputOpts.expectedError is not accessible from the dagger-structure-test module
Function DaggerStructureTestAssertOutputOpts.expectedError is not accessible from the dagger-structure-test module

expectedExitCode() 🔗

Return Type
Integer 
Example
Function DaggerStructureTestAssertOutputOpts.expectedExitCode is not accessible from the dagger-structure-test module
Function DaggerStructureTestAssertOutputOpts.expectedExitCode is not accessible from the dagger-structure-test module
Function DaggerStructureTestAssertOutputOpts.expectedExitCode is not accessible from the dagger-structure-test module
Function DaggerStructureTestAssertOutputOpts.expectedExitCode is not accessible from the dagger-structure-test module

disableCache() 🔗

Return Type
Boolean 
Example
Function DaggerStructureTestAssertOutputOpts.disableCache is not accessible from the dagger-structure-test module
Function DaggerStructureTestAssertOutputOpts.disableCache is not accessible from the dagger-structure-test module
Function DaggerStructureTestAssertOutputOpts.disableCache is not accessible from the dagger-structure-test module
Function DaggerStructureTestAssertOutputOpts.disableCache is not accessible from the dagger-structure-test module

DaggerStructureTestAssertFileExistenceOpts 🔗

permissions() 🔗

Return Type
String 
Example
Function DaggerStructureTestAssertFileExistenceOpts.permissions is not accessible from the dagger-structure-test module
Function DaggerStructureTestAssertFileExistenceOpts.permissions is not accessible from the dagger-structure-test module
Function DaggerStructureTestAssertFileExistenceOpts.permissions is not accessible from the dagger-structure-test module
Function DaggerStructureTestAssertFileExistenceOpts.permissions is not accessible from the dagger-structure-test module

uid() 🔗

Return Type
Integer 
Example
Function DaggerStructureTestAssertFileExistenceOpts.uid is not accessible from the dagger-structure-test module
Function DaggerStructureTestAssertFileExistenceOpts.uid is not accessible from the dagger-structure-test module
Function DaggerStructureTestAssertFileExistenceOpts.uid is not accessible from the dagger-structure-test module
Function DaggerStructureTestAssertFileExistenceOpts.uid is not accessible from the dagger-structure-test module

gid() 🔗

Return Type
Integer 
Example
Function DaggerStructureTestAssertFileExistenceOpts.gid is not accessible from the dagger-structure-test module
Function DaggerStructureTestAssertFileExistenceOpts.gid is not accessible from the dagger-structure-test module
Function DaggerStructureTestAssertFileExistenceOpts.gid is not accessible from the dagger-structure-test module
Function DaggerStructureTestAssertFileExistenceOpts.gid is not accessible from the dagger-structure-test module