Development-time test, expects locally running Couchbase Server and designed for long-running memory profiling
(t *testing.T)
| 198 | |
| 199 | // Development-time test, expects locally running Couchbase Server and designed for long-running memory profiling |
| 200 | func DevTestFetchConfigManual(t *testing.T) { |
| 201 | |
| 202 | base.SetUpTestLogging(t, base.LevelInfo, base.KeyHTTP) |
| 203 | |
| 204 | serverErr := make(chan error) |
| 205 | |
| 206 | config := DefaultStartupConfig("") |
| 207 | |
| 208 | logLevel := base.LevelInfo |
| 209 | config.Logging.Console = &base.ConsoleLoggerConfig{ |
| 210 | LogLevel: &logLevel, |
| 211 | LogKeys: []string{"HTTP", "Config", "CRUD", "DCP", "Sync"}, |
| 212 | } |
| 213 | |
| 214 | config.API.AdminInterfaceAuthentication = base.Ptr(false) |
| 215 | |
| 216 | config.API.PublicInterface = "127.0.0.1:4984" |
| 217 | config.API.AdminInterface = "127.0.0.1:4985" |
| 218 | config.API.MetricsInterface = "127.0.0.1:4986" |
| 219 | |
| 220 | config.Bootstrap.Server = "couchbase://localhost" |
| 221 | config.Bootstrap.Username = "configUser" |
| 222 | config.Bootstrap.Password = "password" |
| 223 | config.Bootstrap.ServerTLSSkipVerify = base.Ptr(true) |
| 224 | config.Bootstrap.UseTLSServer = base.Ptr(false) |
| 225 | |
| 226 | // Start SG with no databases, high frequency polling |
| 227 | config.Bootstrap.ConfigUpdateFrequency = base.NewConfigDuration(time.Second) |
| 228 | |
| 229 | ctx := base.TestCtx(t) |
| 230 | sc, err := SetupServerContext(ctx, &config, true) |
| 231 | require.NoError(t, err) |
| 232 | |
| 233 | defer func() { |
| 234 | sc.Close(ctx) |
| 235 | require.NoError(t, <-serverErr) |
| 236 | }() |
| 237 | |
| 238 | go func() { |
| 239 | serverErr <- StartServer(ctx, &config, sc) |
| 240 | }() |
| 241 | require.NoError(t, sc.WaitForRESTAPIs(ctx)) |
| 242 | |
| 243 | // Sleep to wait for bucket polling iterations, or allow manual modification to server accessibility |
| 244 | |
| 245 | time.Sleep(15 * time.Second) |
| 246 | |
| 247 | } |
nothing calls this directly
no test coverage detected