setup

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BufferSize          = 100
	FilePermission_0600 = 0600
	DirPermission_0755  = 0755
	Charset             = "abcdefghijklmnopqrstuvwxyz0123456789"
)

Variables

This section is empty.

Functions

func AreBothMountedDirectoryAndTestBucketFlagsSet

func AreBothMountedDirectoryAndTestBucketFlagsSet() bool

func BinFile

func BinFile() string

func CleanMntDir

func CleanMntDir()

CleanMntDir cleans the mounted directory.

func CleanUpDir

func CleanUpDir(directoryPath string)

CleanUpDir cleans up the content in given directory.

func CleanupDirectoryOnGCS

func CleanupDirectoryOnGCS(directoryPathOnGCS string)

CleanupDirectoryOnGCS cleans up the object/directory path passed in parameter.

func CompareFileContents

func CompareFileContents(t *testing.T, fileName string, fileContent string)

func CreateTempFile

func CreateTempFile() string

func DynamicBucketMounted

func DynamicBucketMounted() string

DynamicBucketMounted returns the name of the bucket in case of dynamic mount.

func ExecuteTest

func ExecuteTest(m *testing.M) (successCode int)

func ExecuteTestForFlagsSet

func ExecuteTestForFlagsSet(flags []string, m *testing.M) (successCode int)

func ExitWithFailureIfBothTestBucketAndMountedDirectoryFlagsAreNotSet

func ExitWithFailureIfBothTestBucketAndMountedDirectoryFlagsAreNotSet()

func GenerateRandomString

func GenerateRandomString(length int) string

func GetBucketAndObjectBasedOnTypeOfMount

func GetBucketAndObjectBasedOnTypeOfMount(object string) (string, string)

func IgnoreTestIfIntegrationTestFlagIsSet

func IgnoreTestIfIntegrationTestFlagIsSet(t *testing.T)

func LogAndExit

func LogAndExit(s string)

func LogFile

func LogFile() string

func MntDir

func MntDir() string

func MountGCSFuseWithGivenMountFunc

func MountGCSFuseWithGivenMountFunc(flags []string, mountFunc func([]string) error)

func MountedDirectory

func MountedDirectory() string

func OnlyDirMounted

func OnlyDirMounted() string

OnlyDirMounted returns the name of the directory mounted in case of only dir mount.

func ParseSetUpFlags

func ParseSetUpFlags()

func RemoveBinFileCopiedForTesting

func RemoveBinFileCopiedForTesting()

Removing bin file after testing.

func RunScriptForTestData

func RunScriptForTestData(args ...string)

Run the shell script to prepare the testData in the specified bucket. First argument will be name of scipt script

func RunTestsForMountedDirectoryFlag

func RunTestsForMountedDirectoryFlag(m *testing.M)

func SaveLogFileInCaseOfFailure

func SaveLogFileInCaseOfFailure(successCode int)

func SbinFile

func SbinFile() string

func SetBinFile

func SetBinFile(binFileValue string)

func SetDynamicBucketMounted

func SetDynamicBucketMounted(dynamicBucketValue string)

SetDynamicBucketMounted sets the name of the bucket in case of dynamic mount.

func SetLogFile

func SetLogFile(logFileValue string)

func SetMntDir

func SetMntDir(mntDirValue string)

func SetOnlyDirMounted

func SetOnlyDirMounted(onlyDirValue string)

SetOnlyDirMounted sets the name of the directory mounted in case of only dir mount.

func SetTestDir

func SetTestDir(testDirValue string)

func SetUpLogDirForTestDirTests

func SetUpLogDirForTestDirTests(logDirName string) (logDir string)

func SetUpTestDir

func SetUpTestDir() error

func SetUpTestDirForTestBucketFlag

func SetUpTestDirForTestBucketFlag()

func SetupTestDirectory

func SetupTestDirectory(testDirName string) string

SetupTestDirectory creates a testDirectory in the mounted directory and cleans up any content present in it.

func TestBucket

func TestBucket() string

func TestDir

func TestDir() string

func TestInstalledPackage

func TestInstalledPackage() bool

func UnMount

func UnMount() error

func UnMountAndThrowErrorInFailure

func UnMountAndThrowErrorInFailure(flags []string, successCode int)

func UnMountBucket

func UnMountBucket()

func UnmountGCSFuseAndDeleteLogFile

func UnmountGCSFuseAndDeleteLogFile(rootDir string)

func ValidateLogDirForMountedDirTests

func ValidateLogDirForMountedDirTests(logDirName string) (logDir string)

func YAMLConfigFile

func YAMLConfigFile(config config.MountConfig, fileName string) (filePath string)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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