Skip to content

Commit

Permalink
Fix issues with failing tests on darwin (influxdata#7042)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssoroka authored Feb 19, 2020
1 parent 397a04a commit 8b3bd25
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 9 deletions.
9 changes: 5 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -96,6 +98,5 @@ services:
- crate
- -Cnetwork.host=0.0.0.0
- -Ctransport.host=localhost
- -Clicense.enterprise=false
environment:
- CRATE_HEAP_SIZE=128m
2 changes: 2 additions & 0 deletions plugins/inputs/ethtool/ethtool_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build linux

package ethtool

import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 4 additions & 0 deletions plugins/inputs/powerdns_recursor/powerdns_recursor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package powerdns_recursor
import (
"net"
"os"
"runtime"
"sync"
"testing"
"time"
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions plugins/inputs/processes/processes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
5 changes: 0 additions & 5 deletions plugins/inputs/syslog/rfc5426_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ import (

func getTestCasesForRFC5426() []testCasePacket {
testCases := []testCasePacket{
{
name: "empty",
data: []byte(""),
werr: true,
},
{
name: "complete",
data: []byte("<1>1 - - - - - - A"),
Expand Down

0 comments on commit 8b3bd25

Please sign in to comment.