Skip to content

Commit

Permalink
don't parallel test for runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
zackattack01 committed Dec 20, 2024
1 parent 2d74749 commit db0b434
Showing 1 changed file with 12 additions and 25 deletions.
37 changes: 12 additions & 25 deletions pkg/osquery/runtime/runtime_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ func downloadOsqueryInBinDir(binDirectory string) error {
return nil
}

func TestBadBinaryPath(t *testing.T) {
t.Parallel()
func TestBadBinaryPath(t *testing.T) { //nolint:paralleltest
rootDirectory := t.TempDir()

logBytes, slogger := setUpTestSlogger()
Expand Down Expand Up @@ -151,8 +150,7 @@ func TestBadBinaryPath(t *testing.T) {
k.AssertExpectations(t)
}

func TestWithOsqueryFlags(t *testing.T) {
t.Parallel()
func TestWithOsqueryFlags(t *testing.T) { //nolint:paralleltest
rootDirectory := testRootDirectory(t)

logBytes, slogger := setUpTestSlogger()
Expand All @@ -179,9 +177,7 @@ func TestWithOsqueryFlags(t *testing.T) {
waitShutdown(t, runner, logBytes)
}

func TestFlagsChanged(t *testing.T) {
t.Parallel()

func TestFlagsChanged(t *testing.T) { //nolint:paralleltest
rootDirectory := testRootDirectory(t)

logBytes, slogger := setUpTestSlogger()
Expand Down Expand Up @@ -316,8 +312,7 @@ func waitHealthy(t *testing.T, runner *Runner, logBytes *threadsafebuffer.Thread
time.Sleep(2 * time.Second)
}

func TestSimplePath(t *testing.T) {
t.Parallel()
func TestSimplePath(t *testing.T) { //nolint:paralleltest
rootDirectory := testRootDirectory(t)

logBytes, slogger := setUpTestSlogger()
Expand Down Expand Up @@ -349,8 +344,7 @@ func TestSimplePath(t *testing.T) {
waitShutdown(t, runner, logBytes)
}

func TestMultipleInstances(t *testing.T) {
t.Parallel()
func TestMultipleInstances(t *testing.T) { //nolint:paralleltest
rootDirectory := testRootDirectory(t)

logBytes, slogger := setUpTestSlogger()
Expand Down Expand Up @@ -411,8 +405,7 @@ func TestMultipleInstances(t *testing.T) {
require.NotEmpty(t, runner.instances[extraRegistrationId].stats.ExitTime, "exit time should be added to secondary instance stats on shutdown")
}

func TestRunnerHandlesImmediateShutdownWithMultipleInstances(t *testing.T) {
t.Parallel()
func TestRunnerHandlesImmediateShutdownWithMultipleInstances(t *testing.T) { //nolint:paralleltest
rootDirectory := testRootDirectory(t)

logBytes, slogger := setUpTestSlogger()
Expand Down Expand Up @@ -462,8 +455,7 @@ func TestRunnerHandlesImmediateShutdownWithMultipleInstances(t *testing.T) {
require.NotEmpty(t, runner.instances[extraRegistrationId].stats.ExitTime, "exit time should be added to secondary instance stats on shutdown")
}

func TestMultipleShutdowns(t *testing.T) {
t.Parallel()
func TestMultipleShutdowns(t *testing.T) { //nolint:paralleltest
rootDirectory := testRootDirectory(t)

logBytes, slogger := setUpTestSlogger()
Expand Down Expand Up @@ -494,8 +486,7 @@ func TestMultipleShutdowns(t *testing.T) {
}
}

func TestOsqueryDies(t *testing.T) {
t.Parallel()
func TestOsqueryDies(t *testing.T) { //nolint:paralleltest
rootDirectory := testRootDirectory(t)

logBytes, slogger := setUpTestSlogger()
Expand Down Expand Up @@ -538,8 +529,7 @@ func TestOsqueryDies(t *testing.T) {
waitShutdown(t, runner, logBytes)
}

func TestNotStarted(t *testing.T) {
t.Parallel()
func TestNotStarted(t *testing.T) { //nolint:paralleltest
rootDirectory := t.TempDir()

k := typesMocks.NewKnapsack(t)
Expand All @@ -566,9 +556,8 @@ func WithStartFunc(f func(cmd *exec.Cmd) error) OsqueryInstanceOption {
// TestExtensionIsCleanedUp tests that the osquery extension cleans
// itself up. Unfortunately, this test has proved very flakey on
// circle-ci, but just fine on laptops.
func TestExtensionIsCleanedUp(t *testing.T) {
func TestExtensionIsCleanedUp(t *testing.T) { //nolint:paralleltest
t.Skip("https://github.com/kolide/launcher/issues/478")
t.Parallel()

runner, logBytes, teardown := setupOsqueryInstanceForTests(t)
defer teardown()
Expand All @@ -593,8 +582,7 @@ func TestExtensionIsCleanedUp(t *testing.T) {
<-timer1.C
}

func TestMultipleInstancesWithUpdatedRegistrationIDs(t *testing.T) {
t.Parallel()
func TestMultipleInstancesWithUpdatedRegistrationIDs(t *testing.T) { //nolint:paralleltest
rootDirectory := testRootDirectory(t)

logBytes, slogger := setUpTestSlogger()
Expand Down Expand Up @@ -680,8 +668,7 @@ func TestMultipleInstancesWithUpdatedRegistrationIDs(t *testing.T) {
require.NotEmpty(t, runner.instances[types.DefaultRegistrationID].stats.ExitTime, "exit time should be added to default instance stats on shutdown")
}

func TestUpdatingRegistrationIDsOnlyRestartsForChanges(t *testing.T) {
t.Parallel()
func TestUpdatingRegistrationIDsOnlyRestartsForChanges(t *testing.T) { //nolint:paralleltest
rootDirectory := testRootDirectory(t)

logBytes, slogger := setUpTestSlogger()
Expand Down

0 comments on commit db0b434

Please sign in to comment.