Fix issues with failing tests on darwin (#7042)
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
// +build linux
|
||||
|
||||
package ethtool
|
||||
|
||||
import (
|
||||
|
||||
@@ -210,6 +210,7 @@ func TestPostgresqlSqlScript(t *testing.T) {
|
||||
Tagvalue: "",
|
||||
}}
|
||||
p := &Postgresql{
|
||||
Log: testutil.Logger{},
|
||||
Service: postgresql.Service{
|
||||
Address: fmt.Sprintf(
|
||||
"host=%s user=postgres sslmode=disable",
|
||||
|
||||
@@ -3,6 +3,7 @@ package powerdns_recursor
|
||||
import (
|
||||
"net"
|
||||
"os"
|
||||
"runtime"
|
||||
"sync"
|
||||
"testing"
|
||||
"time"
|
||||
@@ -98,6 +99,9 @@ var intOverflowMetrics = "all-outqueries\t18446744073709550195\nanswers-slow\t36
|
||||
"x-ourtime2-4\t302\nx-ourtime4-8\t194\nx-ourtime8-16\t24\n"
|
||||
|
||||
func TestPowerdnsRecursorGeneratesMetrics(t *testing.T) {
|
||||
if runtime.GOOS == "darwin" {
|
||||
t.Skip("Skipping test on darwin")
|
||||
}
|
||||
// We create a fake server to return test data
|
||||
controlSocket := "/tmp/pdns5724354148158589552.controlsocket"
|
||||
addr, err := net.ResolveUnixAddr("unixgram", controlSocket)
|
||||
|
||||
@@ -122,6 +122,9 @@ func TestFromProcFilesWithSpaceInCmd(t *testing.T) {
|
||||
// However, we have had reports of this process state on Ubuntu
|
||||
// Bionic w/ Linux 4.15 (#6270)
|
||||
func TestParkedProcess(t *testing.T) {
|
||||
if runtime.GOOS != "linux" {
|
||||
t.Skip("Parked process test only relevant on linux")
|
||||
}
|
||||
procstat := `88 (watchdog/13) P 2 0 0 0 -1 69238848 0 0 0 0 0 0 0 0 20 0 1 0 20 0 0 18446744073709551615 0 0 0 0 0 0 0 2147483647 0 1 0 0 17 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
`
|
||||
plugin := &Processes{
|
||||
|
||||
@@ -17,11 +17,6 @@ import (
|
||||
|
||||
func getTestCasesForRFC5426() []testCasePacket {
|
||||
testCases := []testCasePacket{
|
||||
{
|
||||
name: "empty",
|
||||
data: []byte(""),
|
||||
werr: true,
|
||||
},
|
||||
{
|
||||
name: "complete",
|
||||
data: []byte("<1>1 - - - - - - A"),
|
||||
|
||||
Reference in New Issue
Block a user