diff --git a/docker-compose.yml b/docker-compose.yml index 1da9d2a3b0de6..3c929f656b7de 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -78,6 +78,10 @@ services: image: ncarlier/mqtt ports: - "1883:1883" + opcua: + image: open62541/open62541 + ports: + - "4840:4840" riemann: image: stealthly/docker-riemann ports: diff --git a/plugins/inputs/opcua/opcua_client_test.go b/plugins/inputs/opcua/opcua_client_test.go index f13e5ba9a1ee4..ffa8521dd05a8 100644 --- a/plugins/inputs/opcua/opcua_client_test.go +++ b/plugins/inputs/opcua/opcua_client_test.go @@ -20,7 +20,9 @@ type OPCTags struct { } func TestClient1Integration(t *testing.T) { - t.Skip("Skipping due to dial tcp 195.254.227.245:4840: connect: connection refused") + if testing.Short() { + t.Skip("Skipping integration test in short mode") + } var testopctags = []OPCTags{ {"ProductName", "0", "i", "2261", "open62541 OPC UA Server"}, @@ -32,7 +34,7 @@ func TestClient1Integration(t *testing.T) { var err error o.MetricName = "testing" - o.Endpoint = "opc.tcp://opcua.rocks:4840" + o.Endpoint = "opc.tcp://localhost:4840" o.AuthMethod = "Anonymous" o.ConnectTimeout = config.Duration(10 * time.Second) o.RequestTimeout = config.Duration(1 * time.Second)