MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / TestManagerSetConfig

Function TestManagerSetConfig

internal/loop/manager_test.go:445–472  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

443}
444
445func TestManagerSetConfig(t *testing.T) {
446 m := NewManager(10, testProvider)
447
448 // Initially nil
449 if m.Config() != nil {
450 t.Error("expected nil config initially")
451 }
452
453 // Set config
454 cfg := &config.Config{
455 OnComplete: config.OnCompleteConfig{
456 Push: true,
457 CreatePR: true,
458 },
459 }
460 m.SetConfig(cfg)
461
462 got := m.Config()
463 if got == nil {
464 t.Fatal("expected non-nil config")
465 }
466 if !got.OnComplete.Push {
467 t.Error("expected OnComplete.Push to be true")
468 }
469 if !got.OnComplete.CreatePR {
470 t.Error("expected OnComplete.CreatePR to be true")
471 }
472}
473
474func TestManagerSetPostCompleteCallback(t *testing.T) {
475 m := NewManager(10, testProvider)

Callers

nothing calls this directly

Calls 3

ConfigMethod · 0.95
SetConfigMethod · 0.95
NewManagerFunction · 0.85

Tested by

no test coverage detected