Fix issues with failing tests on darwin (#7042)

This commit is contained in:
Steven Soroka 2020-02-18 19:13:54 -05:00 committed by GitHub
parent 397a04aa32
commit 8b3bd2585d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 9 deletions

View File

@ -42,14 +42,16 @@ services:
ports:
- "11211:11211"
pgbouncer:
image: mbed/pgbouncer
image: mbentley/ubuntu-pgbouncer
environment:
PG_ENV_POSTGRESQL_USER: pgbouncer
PG_ENV_POSTGRESQL_PASS: pgbouncer
- PG_ENV_POSTGRESQL_USER=pgbouncer
- PG_ENV_POSTGRESQL_PASS=pgbouncer
ports:
- "6432:6432"
postgres:
image: postgres:alpine
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
ports:
- "5432:5432"
rabbitmq:
@ -96,6 +98,5 @@ services:
- crate
- -Cnetwork.host=0.0.0.0
- -Ctransport.host=localhost
- -Clicense.enterprise=false
environment:
- CRATE_HEAP_SIZE=128m

View File

@ -1,3 +1,5 @@
// +build linux
package ethtool
import (

View File

@ -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",

View File

@ -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)

View File

@ -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{

View File

@ -17,11 +17,6 @@ import (
func getTestCasesForRFC5426() []testCasePacket {
testCases := []testCasePacket{
{
name: "empty",
data: []byte(""),
werr: true,
},
{
name: "complete",
data: []byte("<1>1 - - - - - - A"),