Skip to content

Commit

Permalink
Fix powerdns input test (#4554)
Browse files Browse the repository at this point in the history
  • Loading branch information
dupondje authored and glinton committed Aug 14, 2018
1 parent 3268937 commit 763dc69
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions plugins/inputs/powerdns/powerdns_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package powerdns

import (
"crypto/rand"
"encoding/binary"
"fmt"
"net"
"testing"
Expand Down Expand Up @@ -70,10 +68,9 @@ func (s statServer) serverSocket(l net.Listener) {
}
}

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

0 comments on commit 763dc69

Please sign in to comment.