MCPcopy
hub / github.com/caddyserver/caddy / prependCaddyFilePath

Function prependCaddyFilePath

caddytest/caddytest.go:330–334  ·  view source on GitHub ↗

use the convention to replace /[certificatename].[crt|key] with the full path this helps reduce the noise in test configurations and also allow this to run in any path

(rawConfig string)

Source from the content-addressed store, hash-verified

328// this helps reduce the noise in test configurations and also allow this
329// to run in any path
330func prependCaddyFilePath(rawConfig string) string {
331 r := matchKey.ReplaceAllString(rawConfig, getIntegrationDir()+"$1")
332 r = matchCert.ReplaceAllString(r, getIntegrationDir()+"$1")
333 return r
334}
335
336// CreateTestingTransport creates a testing transport that forces call dialing connections to happen locally
337func CreateTestingTransport() *http.Transport {

Callers 3

initServerMethod · 0.85
ensureConfigRunningMethod · 0.85

Calls 1

getIntegrationDirFunction · 0.85

Tested by 1