telegraf/plugins/outputs/zabbix/zabbix_test.go

29 lines
460 B
Go
Raw Normal View History

2016-02-10 13:27:11 +00:00
package zabbix
import (
"testing"
"github.com/influxdata/telegraf/testutil"
"github.com/stretchr/testify/require"
)
func TestConnectAndWrite(t *testing.T) {
if testing.Short() {
t.Skip("Skipping integration test in short mode")
}
host := testutil.GetLocalHost()
z := &Zabbix{
Host: host,
Port: 10051,
Hosttag: "host",
}
err := z.Connect()
require.NoError(t, err)
err = z.Write(testutil.MockMetrics())
require.NoError(t, err)
}