Skip to content

Commit eabc9d6

Browse files
dupondjeJean-Louis Dupond
authored andcommitted
Fix powerdns input test (influxdata#4554)
1 parent ecb89e4 commit eabc9d6

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

plugins/inputs/powerdns/powerdns_test.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package powerdns
22

33
import (
4-
"crypto/rand"
5-
"encoding/binary"
64
"fmt"
75
"net"
86
"testing"
@@ -70,10 +68,9 @@ func (s statServer) serverSocket(l net.Listener) {
7068
}
7169
}
7270

73-
func TestMemcachedGeneratesMetrics(t *testing.T) {
71+
func TestPowerdnsGeneratesMetrics(t *testing.T) {
7472
// We create a fake server to return test data
75-
var randomNumber int64
76-
binary.Read(rand.Reader, binary.LittleEndian, &randomNumber)
73+
randomNumber := int64(5239846799706671610)
7774
socket, err := net.Listen("unix", fmt.Sprintf("/tmp/pdns%d.controlsocket", randomNumber))
7875
if err != nil {
7976
t.Fatal("Cannot initialize server on port ")

0 commit comments

Comments
 (0)