MCPcopy Index your code
hub / github.com/coder/coder / TestManager_IsReady

Function TestManager_IsReady

agent/unit/manager_test.go:672–689  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

670}
671
672func TestManager_IsReady(t *testing.T) {
673 t.Parallel()
674
675 t.Run("IsReadyWithUnregisteredUnit", func(t *testing.T) {
676 t.Parallel()
677
678 manager := unit.NewManager()
679
680 // Given: a unit is not registered
681 u, err := manager.Unit(unitA)
682 require.NoError(t, err)
683 assert.Equal(t, unit.StatusNotRegistered, u.Status())
684 // Then: the unit is not ready
685 isReady, err := manager.IsReady(unitA)
686 require.NoError(t, err)
687 assert.True(t, isReady)
688 })
689}
690
691func TestManager_ToDOT(t *testing.T) {
692 t.Parallel()

Callers

nothing calls this directly

Calls 6

UnitMethod · 0.95
IsReadyMethod · 0.95
NewManagerFunction · 0.92
RunMethod · 0.65
EqualMethod · 0.45
StatusMethod · 0.45

Tested by

no test coverage detected