Skip to content

Commit

Permalink
Fix typo, call shutdown instead of interrupt to validate return
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaMahany committed Jul 25, 2024
1 parent d3e05db commit 85780de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/osquery/runtime/runtime_helpers_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func SocketPath(rootDir string) string {
// launcher and osquery. We would like to be able to run multiple
// launchers.
//
// We could use something based on the laumcher root, but given the
// We could use something based on the launcher root, but given the
// context this runs in a ulid seems simpler.
return fmt.Sprintf(`\\.\pipe\kolide-osquery-%s`, ulid.New())
}
Expand Down
5 changes: 2 additions & 3 deletions pkg/osquery/runtime/runtime_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ package runtime

import (
"context"
"errors"
"fmt"
"log/slog"
"os"
Expand Down Expand Up @@ -358,7 +357,7 @@ func TestWithOsqueryFlags(t *testing.T) {
waitHealthy(t, runner, &logBytes)
assert.Equal(t, []string{"verbose=false"}, runner.instance.opts.osqueryFlags)

runner.Interrupt(errors.New("test error"))
require.NoError(t, runner.Shutdown())
}

func TestFlagsChanged(t *testing.T) {
Expand Down Expand Up @@ -455,7 +454,7 @@ func TestFlagsChanged(t *testing.T) {

k.AssertExpectations(t)

runner.Interrupt(errors.New("test error"))
require.NoError(t, runner.Shutdown())
}

// waitHealthy expects the instance to be healthy within 30 seconds, or else
Expand Down

0 comments on commit 85780de

Please sign in to comment.