Documentation
¶
Index ¶
- func CleanUpTempDir(t *testing.T)
- func CleanupWeaverPreservingDownloads()
- func CreateTestTarGz(outputPath string, files map[string]string) (checksum string, fileChecksums map[string]string, err error)
- func FileWithPrefixExists(t *testing.T, directory string, prefix string) bool
- func InstallCrioRegistriesConf() error
- func PrepareSubCmdForTest(sub *cobra.Command) *cobra.Command
- func RequireChattrSupport(t *testing.T)
- func Reset(t *testing.T)
- func ResetTestEnvironment(t *testing.T)
- func Sudo(cmd *exec.Cmd) *exec.Cmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanUpTempDir ¶
CleanUpTempDir removes temporary files and directories created during tests
func CleanupWeaverPreservingDownloads ¶ added in v0.5.0
func CleanupWeaverPreservingDownloads()
CleanupWeaverPreservingDownloads removes all weaver directories except the shared downloads folder This preserves downloaded files with valid checksums to speed up subsequent test runs
func CreateTestTarGz ¶ added in v0.5.0
func CreateTestTarGz(outputPath string, files map[string]string) (checksum string, fileChecksums map[string]string, err error)
CreateTestTarGz creates a .tar.gz file at outputPath containing the specified files. If files is nil, it creates a default set of files. It returns the SHA256 checksum of the created archive and a map of individual file checksums.
func FileWithPrefixExists ¶ added in v0.5.0
func InstallCrioRegistriesConf ¶
func InstallCrioRegistriesConf() error
InstallCrioRegistriesConf installs the custom registries.conf with registry mirror configuration This enables CRI-O to use a local registry mirror for caching Kubernetes images This is typically called during integration test setup when cache proxy is available
func PrepareSubCmdForTest ¶
PrepareSubCmdForTest creates a root command with the given subcommand added. Use this from tests in other packages to avoid duplicating the helper.
func RequireChattrSupport ¶ added in v0.5.0
RequireChattrSupport checks if chattr immutable attribute is supported Skips the test if chattr is not available or doesn't work (e.g., in containers)
func ResetTestEnvironment ¶ added in v0.5.0
ResetTestEnvironment creates a clean test environment and registers cleanup
Types ¶
This section is empty.