Documentation
¶
Index ¶
- type AssertionSpec
- type CommandResult
- type CommandSpec
- type DebugSpec
- type SetupSpec
- type TarEntryInfo
- type TestCase
- type TestFramework
- func (tf *TestFramework) CheckAssertions(assertions []AssertionSpec, result *CommandResult) error
- func (tf *TestFramework) Cleanup()
- func (tf *TestFramework) LoadTestCase(filename string) (*TestCase, error)
- func (tf *TestFramework) PrintTarContents(tarPath string) error
- func (tf *TestFramework) RunCommand(ctx context.Context, cmd CommandSpec) (*CommandResult, error)
- func (tf *TestFramework) RunTestCase(ctx context.Context, testCase *TestCase) error
- func (tf *TestFramework) SetupFiles(setup SetupSpec) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssertionSpec ¶
type AssertionSpec struct {
Type string
Path string
Content string
Expected string // For expected values in assertions like json_field_equals
Size int64
TarEntry string // For tar-specific assertions, the entry path within the tar
Owner string // For ownership assertions (uid:gid format)
Mode string // For file mode assertions (octal format)
PaxKey string // For pax extended attribute key
}
type CommandResult ¶
type CommandSpec ¶
type TarEntryInfo ¶
TarEntryInfo holds information about a tar entry
type TestCase ¶
type TestCase struct {
Name string
Description string
Setup SetupSpec
Command CommandSpec
Assertions []AssertionSpec
Debug DebugSpec
}
type TestFramework ¶
type TestFramework struct {
Verbose bool
// contains filtered or unexported fields
}
func NewTestFramework ¶
func NewTestFramework(t *testing.T) (*TestFramework, error)
func (*TestFramework) CheckAssertions ¶
func (tf *TestFramework) CheckAssertions(assertions []AssertionSpec, result *CommandResult) error
func (*TestFramework) Cleanup ¶
func (tf *TestFramework) Cleanup()
func (*TestFramework) LoadTestCase ¶
func (tf *TestFramework) LoadTestCase(filename string) (*TestCase, error)
func (*TestFramework) PrintTarContents ¶ added in v0.2.7
func (tf *TestFramework) PrintTarContents(tarPath string) error
PrintTarContents prints the contents of a tar file to stdout for debugging
func (*TestFramework) RunCommand ¶
func (tf *TestFramework) RunCommand(ctx context.Context, cmd CommandSpec) (*CommandResult, error)
func (*TestFramework) RunTestCase ¶
func (tf *TestFramework) RunTestCase(ctx context.Context, testCase *TestCase) error
func (*TestFramework) SetupFiles ¶
func (tf *TestFramework) SetupFiles(setup SetupSpec) error
Click to show internal directories.
Click to hide internal directories.