MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / UnitTestUrl

Function UnitTestUrl

base/constants.go:223–241  ·  view source on GitHub ↗

UnitTestUrl returns the configured test URL.

()

Source from the content-addressed store, hash-verified

221
222// UnitTestUrl returns the configured test URL.
223func UnitTestUrl() string {
224 if TestUseCouchbaseServer() {
225 testCouchbaseServerUrl := os.Getenv(TestEnvCouchbaseServerUrl)
226 if testCouchbaseServerUrl != "" {
227 // If user explicitly set a Test Couchbase Server URL, use that
228 return testCouchbaseServerUrl
229 }
230 // Otherwise fallback to hardcoded default
231 return kTestCouchbaseServerURL
232 } else {
233 testWalrusUrl := os.Getenv(TestEnvWalrusUrl)
234 if testWalrusUrl != "" {
235 // If user explicitly set a Test Walrus URL, use that
236 return testWalrusUrl
237 }
238 // Otherwise fallback to hardcoded default
239 return kTestWalrusURL
240 }
241}
242
243// UnitTestUrlIsWalrus returns true if we're running with a Walrus test URL.
244func UnitTestUrlIsWalrus() bool {

Calls 1

TestUseCouchbaseServerFunction · 0.85