Runtime environment (runenv)
// RunEnv encapsulates the context for this test run.
type RunEnv struct {
RunParams
*logger
...
}
// RunParams encapsulates the runtime parameters for this test.
type RunParams struct {
TestPlan string `json:"plan"`
TestCase string `json:"case"`
TestRun string `json:"run"`
TestRepo string `json:"repo,omitempty"`
TestCommit string `json:"commit,omitempty"`
TestBranch string `json:"branch,omitempty"`
TestTag string `json:"tag,omitempty"`
TestOutputsPath string `json:"outputs_path,omitempty"`
TestTempPath string `json:"temp_path,omitempty"`
TestInstanceCount int `json:"instances"`
TestInstanceRole string `json:"role,omitempty"`
TestInstanceParams map[string]string `json:"params,omitempty"`
TestGroupID string `json:"group,omitempty"`
TestGroupInstanceCount int `json:"group_instances,omitempty"`
// true if the test has access to the sidecar.
TestSidecar bool `json:"test_sidecar,omitempty"`
// The subnet on which this test is running.
//
// The test instance can use this to pick an IP address and/or determine
// the "data" network interface.
//
// This will be 127.1.0.0/16 when using the local exec runner.
TestSubnet *ptypes.IPNet `json:"network,omitempty"`
TestStartTime time.Time `json:"start_time,omitempty"`
// TestCaptureProfiles lists the profile types to capture. These are
// SDK-dependent. The Go SDK supports these profiles:
//
// * cpu => value ignored; CPU profile spans the entire life of the test.
// * any supported profile type https://golang.org/pkg/runtime/pprof/#Profile =>
// value is a string representation of time.Duration, referring to
// the frequency at which profiles will be captured.
TestCaptureProfiles map[string]string `json:"capture_profiles,omitempty"`
}Last updated