github.com/newrelic/newrelic-client-go@v1.1.0/pkg/notifications/notifications_test.go (about) 1 //go:build unit || integration 2 // +build unit integration 3 4 package notifications 5 6 import ( 7 "testing" 8 9 mock "github.com/newrelic/newrelic-client-go/pkg/testhelpers" 10 ) 11 12 func newMockResponse(t *testing.T, mockJSONResponse string, statusCode int) Notifications { 13 ts := mock.NewMockServer(t, mockJSONResponse, statusCode) 14 tc := mock.NewTestConfig(t, ts) 15 16 return New(tc) 17 } 18 19 func newIntegrationTestClient(t *testing.T) Notifications { 20 cfg := mock.NewIntegrationTestConfig(t) 21 client := New(cfg) 22 23 return client 24 }