testutils

package
v0.0.0-...-f161a61 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AreDirsEqual

func AreDirsEqual(source string, dest string) (bool, error)

AreDirsEqual recursively compares two directories for equality NOTE: filepath.Wale guarantees lexical order traversal (elements already ordered) thus allowing us to use a slice as opposed to a map.

func CreateProcessToTerminate

func CreateProcessToTerminate() (int, error)

CreateProcessToTerminate creates a process that to be killed for testing

func MakeAferoTestFs

func MakeAferoTestFs(filesMap map[string][]byte) (afero.Fs, error)

MakeAferoTestFs is a convenience function that lets you construct many directories and files in an afero in-memory filesystem by passing a single path->contents map

func MakeTempTestDir

func MakeTempTestDir(filesMap map[string][]byte) (string, error)

MakeTempTestDir is used to populate a temporary directory with the file/directory contents specified in filesMap. It is useful for setting up temporary test environments

**Parameters:**

filesMap: A pointer to a TTPExecutionConfig that represents the execution configuration for the TTP.

**Returns:**

* the created temporary directory path * an error if any part of the process failed

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL