package sysutil import ( "runtime" "testing" "github.com/stretchr/testify/require" ) func TestRestartService_NonLinux(t *testing.T) { // On non-Linux systems, RestartService should return nil without exiting if runtime.GOOS == "linux" { t.Skip("Skipping non-Linux test on Linux") } err := RestartService() require.NoError(t, err) } func TestRestartServiceAsync_NonLinux(t *testing.T) { // On non-Linux systems, RestartServiceAsync should not panic if runtime.GOOS == "linux" { t.Skip("Skipping non-Linux test on Linux") } // Should not panic RestartServiceAsync() }