helpers

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEmptyFolder

func CreateEmptyFolder(ctx context.Context, client pb.SpaceApiClient, path string)

func CreateLocalStringFile

func CreateLocalStringFile(strContent string) *os.File

func ExpectFileContentEquals

func ExpectFileContentEquals(filePath string, expectedContent []byte)

func ExpectFileExists

func ExpectFileExists(ctx context.Context, client pb.SpaceApiClient, remotePath string, remoteFileName string) *pb.ListDirectoryEntry

func ExpectFileToBeSharedWithMe

func ExpectFileToBeSharedWithMe(
	ctx context.Context,
	client pb.SpaceApiClient,
	fileName, bucket, dbId string,
	isPublicShared bool,
) *pb.SharedListDirectoryEntry

func InitializeApp

func InitializeApp(app *fixtures.RunAppCtx)

func StartWatchingForRemoteBackup

func StartWatchingForRemoteBackup(
	ctx context.Context,
	client pb.SpaceApiClient,
	filePathsToWatch []string,
) (<-chan bool, func())

StartWatchingForRemoteUploads kicks off a goroutine that subscribes to Subscribe rpc for the client and watches for the specified files and buckets to be uploaded The first channels returns returns a true when all files have been found or false after a 5 minutes timeout of not finding them all the second function returned must always be called at the end of a test to ensure the goroutine is stopped.

func UploadFilesToTargetPath

func UploadFilesToTargetPath(
	ctx context.Context,
	client pb.SpaceApiClient,
	targetPath string,
	sourcePaths []string,
)

Types

This section is empty.

Jump to

Keyboard shortcuts

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