Skip to content

Commit

Permalink
test(dot): fix two tests on MacOS
Browse files Browse the repository at this point in the history
Before this change, Test_createSystemService and
Test_createRuntimeStorage were failing on MacOS due to differences to
Linux wrt the unlinkat syscall.

Closes #4283
  • Loading branch information
haikoschol committed Oct 31, 2024
1 parent ff8400a commit aeda566
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dot/services_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ func Test_createRuntimeStorage(t *testing.T) {
stateSrvc, err := builder.createStateService(config)
require.NoError(t, err)

require.NoError(t, stateSrvc.Start())

tests := []struct {
name string
service *state.Service
Expand All @@ -51,6 +53,8 @@ func Test_createRuntimeStorage(t *testing.T) {
assert.NotNil(t, got.PersistentStorage)
})
}

require.NoError(t, stateSrvc.Stop())
}

func Test_createSystemService(t *testing.T) {
Expand All @@ -65,6 +69,8 @@ func Test_createSystemService(t *testing.T) {
stateSrvc, err := builder.createStateService(config)
require.NoError(t, err)

require.NoError(t, stateSrvc.Start())

type args struct {
cfg *types.SystemInfo
service *state.Service
Expand Down Expand Up @@ -96,6 +102,8 @@ func Test_createSystemService(t *testing.T) {
}
})
}

require.NoError(t, stateSrvc.Stop())
}

func Test_newInMemoryDB(t *testing.T) {
Expand Down

0 comments on commit aeda566

Please sign in to comment.