Documentation ¶
Index ¶
- Constants
- Variables
- func GetTestUserID() (int, error)
- func NewIntegrationTestConfig(t *testing.T) config.Config
- func NewMockServer(t *testing.T, mockJSONResponse string, statusCode int) *httptest.Server
- func NewTestConfig(t *testing.T, testServer *httptest.Server) config.Config
- func RandSeq(n int) string
Constants ¶
View Source
const ( AdminAPIKey = "adminAPIKey" // AdminAPIKey used in mock configs (from Environment for Integration tests) LogLevel = "debug" // LogLevel used in mock configs PersonalAPIKey = "personalAPIKey" // PersonalAPIKey used in mock configs (from Environment for Integration tests) UserAgent = "newrelic/newrelic-client-go (automated testing)" // UserAgent used in mock configs LicenseKey = "APMLicenseKey" // LicenseKey used in mock configs )
View Source
const (
// DTK Terraform Test Account
TestAccountID = 2520528
)
Variables ¶
View Source
var (
TestUserID = os.Getenv("NEW_RELIC_TEST_USER_ID")
)
Functions ¶
func GetTestUserID ¶ added in v0.37.0
func NewIntegrationTestConfig ¶
NewIntegrationTestConfig grabs environment vars for required fields or skips the test. returns a fully saturated configuration
func NewMockServer ¶
NewMockServer creates a server to respond to API calls for unit tests
func NewTestConfig ¶
NewTestConfig returns a fully saturated configration with modified BaseURLs for all endpoints based on the test server passed in
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.