acceptance

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TestAccProvider          *schema.Provider
	TestAccProviders         map[string]*schema.Provider
	TestAccProviderFactories map[string]func() (*schema.Provider, error)
	TestExternalProviders    map[string]resource.ExternalProvider
	TestAccFrameworkProvider *provider.FrameworkProvider
)
View Source
var (
	Preferable_plans  = []string{"x1.small.x86", "t1.small.x86", "c2.medium.x86", "c3.small.x86", "c3.medium.x86", "m3.small.x86"}
	Preferable_metros = []string{"ch", "ny", "sv", "ty", "am"}
	Preferable_os     = []string{"ubuntu_20_04"}
)

list of plans and metros and os used as filter criteria to find available hardware to run tests

View Source
var ProtoV5ProviderFactories = map[string]func() (tfprotov5.ProviderServer, error){
	"equinix": func() (tfprotov5.ProviderServer, error) {
		ctx := context.Background()
		providers := []func() tfprotov5.ProviderServer{
			TestAccProviders["equinix"].GRPCProvider,
			providerserver.NewProtocol5(
				TestAccFrameworkProvider,
			),
		}

		muxServer, err := tf5muxserver.NewMuxServer(ctx, providers...)
		if err != nil {
			return nil, err
		}

		return muxServer.ProviderServer(), nil
	},
}

Functions

func ConfAccMetalDevice_base

func ConfAccMetalDevice_base(plans, metros, os []string) string

This function should be used to find available plans in all test where a metal_device resource is needed.

TODO consider adding a datasource for equinix_metal_operating_system and making the local.os conditional

https://github.com/equinix/terraform-provider-equinix/pull/220#discussion_r915418418equinix_metal_operating_system
https://github.com/equinix/terraform-provider-equinix/discussions/221

func GetConfigForNonStandardMetalTest

func GetConfigForNonStandardMetalTest() (*config.Config, error)

func GetFromEnv added in v1.27.0

func GetFromEnv(varName string) (string, error)

func GetFromEnvDefault added in v1.27.0

func GetFromEnvDefault(varName string, defaultValue string) string

func IsSweepableTestResource

func IsSweepableTestResource(namePrefix string) bool

func TestAccCheckMetalSSHKeyExists

func TestAccCheckMetalSSHKeyExists(n string, key *packngo.SSHKey) resource.TestCheckFunc

func TestAccPreCheck added in v1.27.0

func TestAccPreCheck(t *testing.T)

func TestAccPreCheckMetal

func TestAccPreCheckMetal(t *testing.T)

func TestDeviceTerminationTime

func TestDeviceTerminationTime() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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