Documentation
¶
Index ¶
- Variables
- func AssertDefsecEqual(t *testing.T, expected, actual any)
- func AssertRuleFound(t *testing.T, ruleID string, results scan.Results, message string, args ...any)
- func AssertRuleNotFailed(t *testing.T, ruleID string, results scan.Results, message string, args ...any)
- func AssertRuleNotFound(t *testing.T, ruleID string, results scan.Results, message string, args ...any)
- func CopyDir(t *testing.T, src, dst string)
- func CopyFile(t *testing.T, src, dst string)
- func CreateFS(files map[string]string) fs.FS
- func DecompressGzip(t *testing.T, src, dst string)
- func DecompressSparseGzip(t *testing.T, src, dst string)
- func ImageName(subpath, tag, digest string) string
- func MustMkdirAll(t *testing.T, dir string)
- func MustParseReference(t *testing.T, s string) name.Reference
- func MustReadJSON(t *testing.T, filePath string, v any)
- func MustReadYAML(t *testing.T, path string, out any)
- func MustWriteFile(t *testing.T, filePath string, content []byte)
- func MustWriteJSON(t *testing.T, filePath string, v any)
- func MustWriteYAML(t *testing.T, path string, data any)
- func SetupLocalStack(ctx context.Context, version string) (*localstack.LocalStackContainer, string, error)
- func TxtarToFS(t *testing.T, path string) fs.FS
- func VMImageName(subpath, tag, digest string) string
- type DockerClient
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AssertDefsecEqual ¶ added in v0.50.0
func AssertRuleFound ¶ added in v0.50.0
func AssertRuleNotFailed ¶ added in v0.58.0
func AssertRuleNotFound ¶ added in v0.50.0
func CopyDir ¶ added in v0.53.0
CopyDir copies the directory content from src to dst. It supports only simple cases for testing.
func DecompressGzip ¶
func DecompressSparseGzip ¶ added in v0.43.0
DecompressSparseGzip decompresses a sparse gzip file for virtual machine image.
func MustMkdirAll ¶ added in v0.54.0
func MustParseReference ¶ added in v0.68.0
MustParseReference parses a string into a Reference and fails the test if there's an error
func MustWriteFile ¶ added in v0.54.0
func SetupLocalStack ¶ added in v0.50.0
func SetupLocalStack(ctx context.Context, version string) (*localstack.LocalStackContainer, string, error)
func VMImageName ¶ added in v0.57.0
Types ¶
type DockerClient ¶ added in v0.56.0
func NewDockerClient ¶ added in v0.56.0
func NewDockerClient(t *testing.T) *DockerClient
func (*DockerClient) ImageCleanLoad ¶ added in v0.68.0
ImageCleanLoad performs a clean load of a Docker image from a tar archive. It removes any existing images with conflicting RepoTags before loading, ensuring the loaded image has the correct RepoTags from the archive. It automatically registers cleanup via t.Cleanup() to remove the loaded image after the test.
func (*DockerClient) ImageLoad ¶ added in v0.56.0
ImageLoad loads a Docker image from a tar archive file into the Docker engine. It automatically registers cleanup via t.Cleanup() to remove the loaded image after the test.