acctest

package
v7.11.2 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const RtDefaultUser = "admin"

Variables

View Source
var ProtoV5MuxProviderFactories map[string]func() (tfprotov5.ProviderServer, error)

ProtoV5MuxProviderFactories is used to instantiate both SDK v2 and Framework providers during acceptance tests. Use it only if you need to combine resources from SDK v2 and the Framework in the same test.

View Source
var Provider *schema.Provider

Provider PreCheck(t) must be called before using this provider instance.

View Source
var ProviderFactories map[string]func() (*schema.Provider, error)

Functions

func CheckRepo

func CheckRepo(id string, request *resty.Request) (*resty.Response, error)

func CompareArtifactoryVersions added in v7.11.2

func CompareArtifactoryVersions(t *testing.T, instanceVersions string) (bool, error)

func CompositeCheckDestroy

func CompositeCheckDestroy(funcs ...func(state *terraform.State) error) func(state *terraform.State) error

func CreateProject

func CreateProject(t *testing.T, projectKey string)

func CreateProxy

func CreateProxy(t *testing.T, proxyKey string)

CreateProxy creates a new proxy on Artifactory with the given key

func CreateRepo

func CreateRepo(t *testing.T, repo string, rclass string, packageType string,
	handleReleases bool, handleSnapshots bool)

CreateRepo Create a local repository with Xray indexing enabled. It will be used in the tests

func CreateUserUpdatable

func CreateUserUpdatable(t *testing.T, name string, email string)

func DeleteProject

func DeleteProject(t *testing.T, projectKey string)

func DeleteProxy

func DeleteProxy(t *testing.T, proxyKey string)

DeleteProxy deletes an existing proxy on Artifactory with the given key

func DeleteRepo

func DeleteRepo(t *testing.T, repo string)

func DeleteUser

func DeleteUser(t *testing.T, name string) error

func GetArtifactoryUrl

func GetArtifactoryUrl(t *testing.T) string

func GetTestResty

func GetTestResty(t *testing.T) *resty.Client

func GetValidRandomDefaultRepoLayoutRef

func GetValidRandomDefaultRepoLayoutRef() string

GetValidRandomDefaultRepoLayoutRef Usage of the function is strictly restricted to Test Cases

func PreCheck

func PreCheck(t *testing.T)

PreCheck This function should be present in every acceptance test.

func VerifyDeleted

func VerifyDeleted(id string, check CheckFun) func(*terraform.State) error

Types

type CheckFun

type CheckFun func(id string, request *resty.Request) (*resty.Response, error)

Jump to

Keyboard shortcuts

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