{"modulePath":"github.com/cloudzero/cloudzero-agent","version":"v1.1.0-rc-1","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package test\n\nPackage test contains higher-level (e.g., integration) tests.\n\n## Types\n\n```go\ntype LogCapture struct {\n\tLines []string\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewLogCapture(logger *logrus.Logger) *LogCapture\n```\nNewLogCapture sets up plain text logging to be captured for testing purposes\n\n```go\nfunc NewLogCaptureWithCurrentFormatter(logger *logrus.Logger) *LogCapture\n```\nNewLogCaptureWithCurrentFormatter sets up capture with current formatter\n\n```go\nfunc (l *LogCapture) Clear()\n```\nClear clears captured lines\n\n```go\nfunc (l *LogCapture) Extract(index int, key string) string\n```\nExtract looks for a key=value pair for line at given index, returning the value or empty if not found. This is possible because we log using plain text logging.\n\n```go\nfunc (l *LogCapture) Len() int\n```\nLen returns number of log lines captured\n\n```go\nfunc (l *LogCapture) Write(p []byte) (n int, err error)\n```\nWrite echos line to console and captures same line\n\n```go\ntype MockRoundTripper struct {\n\tResponses map[string][]*http.Response\n\tErrors    map[string][]error\n}\n```\n\n```go\nfunc NewHTTPMock() *MockRoundTripper\n```\n\n```go\nfunc (m *MockRoundTripper) Expect(method string, body string, status int, err error)\n```\n\n```go\nfunc (m *MockRoundTripper) HTTPClient() *http.Client\n```\n\n```go\nfunc (m *MockRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)\n```\n\n","path":"github.com/cloudzero/cloudzero-agent/test","name":"test","synopsis":"Package test contains higher-level (e.g., integration) tests.","isRedistributable":true}
