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

Function SetConfigContent

integration/helpers/config.go:101–106  ·  view source on GitHub ↗

SetConfigContent writes given raw config into given directory as "config.json".

(dir string, rawConfig string)

Source from the content-addressed store, hash-verified

99
100// SetConfigContent writes given raw config into given directory as "config.json".
101func SetConfigContent(dir string, rawConfig string) {
102 err := os.MkdirAll(filepath.Join(dir), 0777)
103 Expect(err).ToNot(HaveOccurred())
104 err = os.WriteFile(filepath.Join(dir, "config.json"), []byte(rawConfig), 0644)
105 Expect(err).ToNot(HaveOccurred())
106}
107
108// ExpiredAccessToken returns an example expired bearer token.
109func ExpiredAccessToken() string {

Callers 3

config_test.goFile · 0.92
setConfigFunction · 0.92
setPluginConfigFunction · 0.92

Calls

no outgoing calls

Tested by 2

setConfigFunction · 0.74
setPluginConfigFunction · 0.74