(t *testing.T)
| 325 | } |
| 326 | |
| 327 | func TestLoader_StopWatchWithoutWatcher(t *testing.T) { |
| 328 | gtest.C(t, func(t *gtest.T) { |
| 329 | // Create a new config instance |
| 330 | cfg, err := gcfg.NewAdapterContent(configContent) |
| 331 | t.AssertNil(err) |
| 332 | |
| 333 | // Create loader without starting to watch |
| 334 | loader := gcfg.NewLoaderWithAdapter[TestConfig](cfg, "") |
| 335 | |
| 336 | // Initially, should not be watching |
| 337 | t.Assert(loader.IsWatching(), false) |
| 338 | |
| 339 | // Try to stop watching when not watching |
| 340 | stopped, err := loader.StopWatch(context.Background()) |
| 341 | t.AssertNE(err, nil) |
| 342 | t.Assert(stopped, false) |
| 343 | t.Assert(err.Error(), "No watcher name specified") |
| 344 | }) |
| 345 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…