Documentation
¶
Index ¶
- func ApplyExampleConfig(t *testing.T, cmd *exec.Cmd)
- func Dedent(in string) string
- func DedentYaml(in string) string
- func GetRepoRoot(t *testing.T) string
- func SetEnv(t *testing.T, env []string)
- func SetEnvFromToEnv(t *testing.T, toEnver ToEnver)
- func StandardBackups(t *testing.T, args ...string) *exec.Cmd
- type BlockingBackend
- type DumpBackend
- type TestConfig
- type ToEnver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DedentYaml ¶
func GetRepoRoot ¶
func SetEnvFromToEnv ¶
Types ¶
type BlockingBackend ¶
type BlockingBackend struct {
Path string
// contains filtered or unexported fields
}
BlockingBackend is standard-backups backend meant for testing. When invoked, it blocks waiting for a signal from the testing process. All its actions are logged to a file so that they can be examined later on.
func NewBlockingBackend ¶
func NewBlockingBackend(t *testing.T, name string, logFile string) *BlockingBackend
func (*BlockingBackend) Unblock ¶
func (b *BlockingBackend) Unblock()
type DumpBackend ¶
type DumpBackend struct {
Path string
// contains filtered or unexported fields
}
func NewDumpBackend ¶
func NewDumpBackend(t *testing.T) *DumpBackend
func (*DumpBackend) ReadBytes ¶
func (b *DumpBackend) ReadBytes(name string) []byte
func (*DumpBackend) ReadJsonArray ¶
func (b *DumpBackend) ReadJsonArray(name string) []any
func (*DumpBackend) ReadJsonMap ¶
func (b *DumpBackend) ReadJsonMap(name string) map[string]any
func (*DumpBackend) ReadString ¶
func (b *DumpBackend) ReadString(name string) string
type TestConfig ¶
type TestConfig struct {
ConfigPath string
DataDir string
BackendsDir string
RecipesDir string
// contains filtered or unexported fields
}
func NewTestConfig ¶
func NewTestConfig(t *testing.T) *TestConfig
func (*TestConfig) AddBackend ¶
func (tc *TestConfig) AddBackend(name string, bin string)
func (*TestConfig) AddBogusRecipe ¶
func (tc *TestConfig) AddBogusRecipe(t *testing.T, name string) string
func (*TestConfig) AddRecipe ¶
func (tc *TestConfig) AddRecipe(name string, content string)
func (*TestConfig) Apply ¶
func (tc *TestConfig) Apply(cmd *exec.Cmd)
func (*TestConfig) WriteConfig ¶
func (tc *TestConfig) WriteConfig(content string)
Click to show internal directories.
Click to hide internal directories.