Skip to content

Commit

Permalink
Add test to check stop with partial start
Browse files Browse the repository at this point in the history
  • Loading branch information
pjanotti committed Nov 7, 2024
1 parent 1d7b73f commit 45756b9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/stanza/operator/input/windows/input_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ func TestInputCreate_Stop(t *testing.T) {
assert.NoError(t, input.Stop())
}

// TestInputCreate_PartialStart_Stop ensures the input correctly shuts down even if it was minimally started.
func TestInputCreate_PartialStart_Stop(t *testing.T) {
input := newTestInput()
input.cancel = func() {}
assert.NoError(t, input.Stop())
}

// TestInputStart_LocalSubscriptionError ensures the input correctly handles local subscription errors.
func TestInputStart_LocalSubscriptionError(t *testing.T) {
persister := testutil.NewMockPersister("")
Expand Down

0 comments on commit 45756b9

Please sign in to comment.