Skip to content

Commit

Permalink
Initialized logs in failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbalazs93 committed Apr 14, 2017
1 parent 6242b50 commit d20d624
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"net/http"
"strings"
"testing"
"os"
)

type MockWebClient struct{}
Expand All @@ -16,12 +17,12 @@ type mockTransport struct {
}

const (
validIP = "1.0.0.0"
validK8sServiceName = "validServiceName"
validK8sServiceNameWithAck = "validK8sServiceNameWithAck"
nonExistingK8sServiceName = "vnonExistingServiceName"
validSeverity = uint8(1)
ackMsg = "ack-msg"
validIP = "1.0.0.0"
validK8sServiceName = "validServiceName"
validK8sServiceNameWithAck = "validK8sServiceNameWithAck"
nonExistingK8sServiceName = "vnonExistingServiceName"
validSeverity = uint8(1)
ackMsg = "ack-msg"
validFailingHealthCheckResponseBody = `{
"schemaVersion": 1,
"name": "CMSNotifierApplication",
Expand Down Expand Up @@ -163,6 +164,7 @@ func TestCheckPodHealthFailingChecks(t *testing.T) {
}

func TestCheckPodHealthWithInvalidUrl(t *testing.T) {
initLogs(os.Stdout, os.Stdout, os.Stderr)
service := initializeMockService(nil)
err := service.checkPodHealth(pod{name: "test", ip: "%s"}, 8080)
assert.NotNil(t, err)
Expand Down

0 comments on commit d20d624

Please sign in to comment.