acctest

package
v0.16.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2026 License: Apache-2.0 Imports: 45 Imported by: 0

Documentation

Index

Constants

View Source
const AccTestTrainedModelID = "terraform-acc-test-model"

AccTestTrainedModelID is the stable ID for the first acceptance-test bootstrap trained model.

View Source
const AccTestTrainedModelID2 = "terraform-acc-test-model-2"

AccTestTrainedModelID2 is the stable ID for the second acceptance-test bootstrap trained model.

View Source
const FixturePyTorchModelID = "terraform-acc-test-pytorch-fixture"

FixturePyTorchModelID is the stable model ID for the fixture PyTorch model.

Variables

View Source
var CCRRemoteClusterAlias = fmt.Sprintf("acc-ccr-remote-%d", os.Getpid())

CCRRemoteClusterAlias is the remote cluster alias registered for self-remote CCR tests. It is unique per test process so that CCR test packages running concurrently (gotestsum runs package binaries in parallel) do not clobber one another's shared persistent remote-cluster setting.

View Source
var Providers map[string]func() (tfprotov6.ProviderServer, error)

Functions

func CreateESAccessToken added in v0.14.4

func CreateESAccessToken(t *testing.T) string

func EnsureFixturePyTorchModel added in v0.16.2

func EnsureFixturePyTorchModel(t *testing.T) string

EnsureFixturePyTorchModel creates a TorchScript model fixture using only raw Elasticsearch ML APIs (no Eland, no Python). It returns the model ID. On capacity failure it calls t.Skip.

func EnsureTrainedModel added in v0.16.2

func EnsureTrainedModel(t *testing.T)

EnsureTrainedModel creates the first acceptance-test trained model if it does not exist. This is a convenience wrapper around EnsureTrainedModelByID.

func EnsureTrainedModelByID added in v0.16.2

func EnsureTrainedModelByID(t *testing.T, modelID string)

EnsureTrainedModelByID creates a minimal trained model with the given ID in the acceptance-test cluster if it does not already exist. The model is a tiny single-leaf tree_ensemble that uses negligible memory and requires no deployment. Creation is executed once per model ID across the test process.

func KibanaConnectionAuthChecks added in v0.15.0

func KibanaConnectionAuthChecks(resourceName string) []resource.TestCheckFunc

func KibanaConnectionVariables added in v0.15.0

func KibanaConnectionVariables(additional ...config.Variables) config.Variables

func NamedTestCaseDirectory added in v0.12.2

func NamedTestCaseDirectory(name string) config.TestStepConfigFunc

func PreCheck

func PreCheck(t *testing.T)

func PreCheckWithExplicitKibanaEndpoint added in v0.14.4

func PreCheckWithExplicitKibanaEndpoint(t *testing.T)

func PreCheckWithWorkflowsEnabled added in v0.14.4

func PreCheckWithWorkflowsEnabled(t *testing.T, minVersion *version.Version)

PreCheckWithWorkflowsEnabled runs standard pre-checks, skips if the server version is below minVersion, and ensures the workflows UI setting is enabled in Kibana.

func SkipIfCCRUnavailable added in v0.16.2

func SkipIfCCRUnavailable(t *testing.T)

SkipIfCCRUnavailable skips the test when the cluster license does not include CCR.

func SkipIfNotAcceptanceTest added in v0.16.1

func SkipIfNotAcceptanceTest(t *testing.T)

SkipIfNotAcceptanceTest skips the calling test when TF_ACC is not set, matching the framework's resource.Test() behavior. Call this as the first statement of any test that performs live-stack setup (CreateESAccessToken, out-of-band API calls, version probes, etc.) before reaching resource.Test, so the test skips cleanly without a running stack.

Types

type CCRTestEnv added in v0.16.2

type CCRTestEnv struct {
	RemoteClusterAlias string
	RemoteProxyAddress string
}

CCRTestEnv holds identifiers shared by CCR acceptance tests.

func PreCheckCCR added in v0.16.2

func PreCheckCCR(t *testing.T) CCRTestEnv

PreCheckCCR runs standard acceptance pre-checks, skips when CCR is unavailable, registers the self-remote cluster in proxy mode using the Elasticsearch transport endpoint, and returns configuration shared by CCR acceptance tests. Proxy-mode remote clusters open raw transport (TCP) connections; for a self-remote the ES node connects to proxy_address from inside its own container, so the address must be host:transport_port (not the HTTP port).

type TLSMaterial added in v0.14.4

type TLSMaterial struct {
	CAPEM    string
	CertPEM  string
	KeyPEM   string
	CAFile   string
	CertFile string
	KeyFile  string
}

func CreateTLSMaterial added in v0.14.4

func CreateTLSMaterial(t *testing.T, commonName string) TLSMaterial

Directories

Path Synopsis
Package reproductions holds TestAccReproduceIssue{N} acceptance tests authored by the reproducer-factory workflow as a fallback when no resource package can be confidently identified from the issue.
Package reproductions holds TestAccReproduceIssue{N} acceptance tests authored by the reproducer-factory workflow as a fallback when no resource package can be confidently identified from the issue.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL