MCPcopy
hub / github.com/cloudfoundry/cli / SetHomeDir

Function SetHomeDir

integration/helpers/config.go:31–38  ·  view source on GitHub ↗

SetHomeDir sets CF_HOME and CF_PLUGIN_HOME to a temp directory and outputs the created directory through GinkgoWriter.

()

Source from the content-addressed store, hash-verified

29// SetHomeDir sets CF_HOME and CF_PLUGIN_HOME to a temp directory and outputs
30// the created directory through GinkgoWriter.
31func SetHomeDir() string {
32 var err error
33 homeDir, err := os.MkdirTemp("", "cli-integration-test")
34 Expect(err).NotTo(HaveOccurred())
35
36 setHomeDirsTo(homeDir, homeDir)
37 return homeDir
38}
39
40// WithRandomHomeDir sets CF_HOME and CF_PLUGIN_HOME to a temp directory and outputs
41// the created directory through GinkgoWriter. Then it executes the provided function

Callers 11

push_suite_test.goFile · 0.92
CommonGinkgoSetupFunction · 0.92
WithRandomHomeDirFunction · 0.85
SetupSynchronizedSuiteFunction · 0.85
SetupReadOnlyOrgAndSpaceFunction · 0.85

Calls 1

setHomeDirsToFunction · 0.85

Tested by

no test coverage detected