(t *testing.T)
| 62 | } |
| 63 | |
| 64 | func TestManagerRequiresServicesToBeInNewState(t *testing.T) { |
| 65 | t.Parallel() |
| 66 | |
| 67 | s1 := serviceThatDoesntDoAnything() |
| 68 | s2 := serviceThatDoesntDoAnything() |
| 69 | s3 := serviceThatDoesntDoAnything() |
| 70 | |
| 71 | require.NoError(t, s1.StartAsync(context.Background())) |
| 72 | t.Cleanup(func() { |
| 73 | require.NoError(t, StopAndAwaitTerminated(context.Background(), s1)) |
| 74 | }) |
| 75 | |
| 76 | _, err := NewManager(s1, s2, s3) |
| 77 | require.Error(t, err) // s1 is not New anymore |
| 78 | } |
| 79 | |
| 80 | func TestManagerReactsOnExternalStateChanges(t *testing.T) { |
| 81 | t.Parallel() |
nothing calls this directly
no test coverage detected