MCPcopy Index your code
hub / github.com/rclone/rclone / createTestEnvironment

Function createTestEnvironment

cmdtest/cmdtest_test.go:102–109  ·  view source on GitHub ↗

createTestEnvironment creates a temporary testFolder and sets testConfig to testFolder/rclone.config.

(t *testing.T)

Source from the content-addressed store, hash-verified

100// createTestEnvironment creates a temporary testFolder and
101// sets testConfig to testFolder/rclone.config.
102func createTestEnvironment(t *testing.T) {
103 //Set temporary folder for config and test data
104 tempFolder := t.TempDir()
105 testFolder = filepath.ToSlash(tempFolder)
106
107 // Set path to temporary config file
108 testConfig = testFolder + "/rclone.config"
109}
110
111var testFolder string
112var testConfig string

Callers 2

TestCmdTestFunction · 0.85
TestEnvironmentVariablesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…