Documentation ¶
Index ¶
- Variables
- func AppendToFile(path string, content string) error
- func CreateFileWithContent(fileName, content string) (string, error)
- func CreateTempFile(size int) (string, error)
- func DefaultTestErrorHandler(t *testing.T) func(line string)
- func ExistDir(path string) (bool, error)
- func ExistFile(path string) (bool, error)
- func FileContent(path string) string
- func FileCountInDir(path string) int
- func IsFileHasContent(path string) bool
- func NewTestFlow(args ...string) *testFlow
- func RemoveFile(filePath string) error
- func RemoveResultPath() error
- func RemoveRootPath() error
- func RemoveTempPath() error
- func ResultPath() (string, error)
- func RootPath() (string, error)
- func RunCmd(t *testing.T, args ...string) string
- func RunCmdWithError(args ...string) (string, string)
- func TempPath() (string, error)
- func TestDocument(cmdName string, t *testing.T)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Debug = true Local = len(os.Getenv("QSHELL_LOCAL")) > 0 ShouldTestUser = len(os.Getenv("QSHELL_Test_User")) > 0 AccessKey = os.Getenv("accessKey") SecretKey = os.Getenv("secretKey") Bucket = testBucket() BucketDomain = testBucketDomain() UploadDomain = testUploadDomain() DocumentOption = "--doc" )
View Source
var ( BucketNotExist = "qshell-na0-mock" BucketObjectDomain = fmt.Sprintf("https://%s/hello1_test.json", BucketDomain) BucketObjectDomains = []string{ fmt.Sprintf("https://%s/hello1_test.json", BucketDomain), fmt.Sprintf("https://%s/hello2_test.json", BucketDomain), fmt.Sprintf("https://%s/hello3_test.json", BucketDomain), fmt.Sprintf("https://%s/hello4_test.json", BucketDomain), fmt.Sprintf("https://%s/hello5_test.json", BucketDomain), fmt.Sprintf("https://%s/hello6_test.json", BucketDomain), fmt.Sprintf("https://%s/hello7_test.json", BucketDomain), } BucketObjectDomainsString = strings.ReplaceAll(`https://domain/hello1_test.json https://domain/hello2_test.json https://domain/hello3_test.json https://domain/hello4_test.json https://domain/hello5_test.json https://domain/hello6_test.json https://domain/hello7_test.json `, "domain", BucketDomain) Key = "hello1_test.json" KeyNotExist = "hello_mock.json" OriginKeys = []string{"hello1.json", "hello2.json", "hello3.json", "hello4.json", "hello5.json", "hello6.json", "hello7.json"} Keys = []string{"hello1_test.json", "hello2_test.json", "hello3_test.json", "hello4_test.json", "hello5_test.json", "hello6_test.json", "hello7_test.json"} KeysString = `hello1_test.json hello2_test.json hello3_test.json hello4_test.json hello5_test.json hello6_test.json hello7_test.json` )
Functions ¶
func AppendToFile ¶
func CreateFileWithContent ¶
func CreateTempFile ¶
func DefaultTestErrorHandler ¶
func FileContent ¶
func FileCountInDir ¶
func IsFileHasContent ¶
func NewTestFlow ¶
func NewTestFlow(args ...string) *testFlow
func RemoveFile ¶
func RemoveResultPath ¶ added in v2.8.0
func RemoveResultPath() error
func RemoveRootPath ¶ added in v2.8.0
func RemoveRootPath() error
func RemoveTempPath ¶ added in v2.8.0
func RemoveTempPath() error
func ResultPath ¶
func RunCmdWithError ¶
func TestDocument ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.