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

Function replaceConfig

integration/v7/isolated/oauth_client_test.go:23–28  ·  view source on GitHub ↗
(path string, old string, new string)

Source from the content-addressed store, hash-verified

21}
22
23func replaceConfig(path string, old string, new string) {
24 r := regexp.MustCompile(old)
25 newConfig := r.ReplaceAllString(fileAsString(path), new)
26 err := os.WriteFile(path, []byte(newConfig), 0600)
27 Expect(err).ToNot(HaveOccurred())
28}
29
30var _ = Describe("custom oauth client id", func() {
31 var configPath string

Callers 1

Calls 1

fileAsStringFunction · 0.85

Tested by

no test coverage detected