clitestutil

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package clitestutil contains utilities for

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirEntry

type DirEntry struct {
	Name     string
	ObjectID string
}

DirEntry represents directory entry.

func ListDirectory

func ListDirectory(t *testing.T, e testEnv, targets ...string) []DirEntry

ListDirectory lists a given directory and returns directory entries.

func ListDirectoryRecursive

func ListDirectoryRecursive(t *testing.T, e testEnv, targets ...string) []DirEntry

ListDirectoryRecursive lists a given directory recursively and returns directory entries.

type SnapshotInfo

type SnapshotInfo struct {
	ObjectID   string
	SnapshotID string
	Time       time.Time
}

SnapshotInfo represents a single snapshot information.

type SourceInfo

type SourceInfo struct {
	User      string
	Host      string
	Path      string
	Snapshots []SnapshotInfo
}

SourceInfo reprents a single source (user@host:/path) with its snapshots.

func ListSnapshotsAndExpectSuccess

func ListSnapshotsAndExpectSuccess(t *testing.T, e testEnv, targets ...string) []SourceInfo

ListSnapshotsAndExpectSuccess lists given snapshots and parses the output.

func MustParseSnapshots

func MustParseSnapshots(t *testing.T, lines []string) []SourceInfo

MustParseSnapshots parsers the output of 'snapshot list'.

Jump to

Keyboard shortcuts

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