Documentation ¶
Index ¶
- func RunScript(script []string) testcontainers.ContainerHook
- type ContainerInfo
- func (ci *ContainerInfo) Host(t *testing.T) string
- func (ci *ContainerInfo) HostForNamedContainer(t *testing.T, containerName string) string
- func (ci *ContainerInfo) MappedPort(t *testing.T, port string) string
- func (ci *ContainerInfo) MappedPortForNamedContainer(t *testing.T, containerName string, port string) string
- type IntegrationTest
- type TestOption
- func AllowHardcodedHostPort() TestOption
- func FailOnErrorLogs() TestOption
- func WithCompareOptions(opts ...pmetrictest.CompareMetricsOption) TestOption
- func WithCompareTimeout(t time.Duration) TestOption
- func WithContainerRequest(cr testcontainers.ContainerRequest) TestOption
- func WithCreateContainerTimeout(t time.Duration) TestOption
- func WithCustomConfig(c customConfigFunc) TestOption
- func WithExpectedFile(f string) TestOption
- func WriteExpected() TestOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ContainerInfo ¶
func (*ContainerInfo) HostForNamedContainer ¶ added in v0.79.0
func (ci *ContainerInfo) HostForNamedContainer(t *testing.T, containerName string) string
func (*ContainerInfo) MappedPort ¶
func (ci *ContainerInfo) MappedPort(t *testing.T, port string) string
func (*ContainerInfo) MappedPortForNamedContainer ¶ added in v0.79.0
type IntegrationTest ¶
type IntegrationTest struct {
// contains filtered or unexported fields
}
func NewIntegrationTest ¶
func NewIntegrationTest(f receiver.Factory, opts ...TestOption) *IntegrationTest
func (*IntegrationTest) Run ¶
func (it *IntegrationTest) Run(t *testing.T)
type TestOption ¶
type TestOption func(*IntegrationTest)
func AllowHardcodedHostPort ¶ added in v0.80.0
func AllowHardcodedHostPort() TestOption
func FailOnErrorLogs ¶ added in v0.79.0
func FailOnErrorLogs() TestOption
This option is useful for debugging scrapers but should not be used permanently because the logs do not correlate to a single scrape interval. In other words, when a retryable failure occurs, this setting will likely force a failure anyways.
func WithCompareOptions ¶
func WithCompareOptions(opts ...pmetrictest.CompareMetricsOption) TestOption
func WithCompareTimeout ¶
func WithCompareTimeout(t time.Duration) TestOption
func WithContainerRequest ¶
func WithContainerRequest(cr testcontainers.ContainerRequest) TestOption
func WithCreateContainerTimeout ¶
func WithCreateContainerTimeout(t time.Duration) TestOption
func WithCustomConfig ¶
func WithCustomConfig(c customConfigFunc) TestOption
func WithExpectedFile ¶
func WithExpectedFile(f string) TestOption
func WriteExpected ¶ added in v0.79.0
func WriteExpected() TestOption
Click to show internal directories.
Click to hide internal directories.