UnitTestUrl returns the configured test URL.
()
| 221 | |
| 222 | // UnitTestUrl returns the configured test URL. |
| 223 | func 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. |
| 244 | func UnitTestUrlIsWalrus() bool { |