acctest

package
v6.6.3 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ProviderName is the name of the provider
	ProviderName = "ionoscloud"
)

Variables

View Source
var (
	// TestAccProtoV6ProviderFactories is a map of provider names to provider factories
	TestAccProtoV6ProviderFactories = map[string]func() (tfprotov6.ProviderServer, error){
		ProviderName: func() (tfprotov6.ProviderServer, error) {
			ctx := context.Background()
			upgradedSdkServer, err := tf5to6server.UpgradeServer(
				ctx,
				ionoscloud.Provider().GRPCProvider,
			)
			if err != nil {
				log.Fatal(err)
			}

			providers := []func() tfprotov6.ProviderServer{
				providerserver.NewProtocol6(provider.New()),
				func() tfprotov6.ProviderServer {
					return upgradedSdkServer
				},
			}

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

			return muxServer.ProviderServer(), nil
		},
	}
)

Functions

func GenerateRandomResourceName

func GenerateRandomResourceName(prefix string) string

GenerateRandomResourceName builds a unique-ish resource identifier to use in tests.

func ObjectStorageClient added in v6.6.0

func ObjectStorageClient() (*objstorage.APIClient, error)

ObjectStorageClient returns a new S3 client for acceptance testing

func PreCheck

func PreCheck(t *testing.T)

PreCheck ensures the necessary environment variables are set for acceptance testing

Types

This section is empty.

Jump to

Keyboard shortcuts

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