testutils

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2020 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckNestedKeyExistsWithValue

func CheckNestedKeyExistsWithValue(tfNode string, propertyName string, propertyValue string) resource.TestCheckFunc

CheckNestedKeyExistsWithValue checks if a property exists with a certain value in an instance state

func CheckServiceEndpointDestroyed

func CheckServiceEndpointDestroyed(resourceType string) resource.TestCheckFunc

CheckServiceEndpointDestroyed verifies that all service endpoints of the given type in the state are destroyed. This will be invoked *after* terrafform destroys the resource but *before* the state is wiped clean.

func CheckServiceEndpointExistsWithName

func CheckServiceEndpointExistsWithName(tfNode string, expectedName string) resource.TestCheckFunc

CheckServiceEndpointExistsWithName verifies that a service endpoint of a particular type exists in the state, and that it has the expected name when compared against the data in Azure DevOps.

func ComputeProjectQualifiedResourceImportID

func ComputeProjectQualifiedResourceImportID(resourceNode string) resource.ImportStateIdFunc

ComputeProjectQualifiedResourceImportID returns a function that can be used to construct an import ID of a resource that has an import ID in the following form: <project ID>/<resource ID>

func GenerateResourceName

func GenerateResourceName() string

GenerateResourceName generates a random name with a constant prefix, useful for acceptance tests

func GetProvider

func GetProvider() *schema.Provider

GetProvider returns the azuredevops provider

func GetProviders

func GetProviders() map[string]terraform.ResourceProvider

GetProviders returns a map of all providers needed for the project

func HclAgentPoolDataSource

func HclAgentPoolDataSource() string

HclAgentPoolDataSource HCL describing a data source for an AzDO Agent Pool

func HclAgentPoolResource

func HclAgentPoolResource(poolName string) string

HclAgentPoolResource HCL describing an AzDO Agent Pool

func HclAgentPoolResourceAppendPoolNameToResourceName

func HclAgentPoolResourceAppendPoolNameToResourceName(poolName string) string

HclAgentPoolResourceAppendPoolNameToResourceName HCL describing an AzDO Agent Pool with agent pool name appended to resource name

func HclAgentPoolsDataSource

func HclAgentPoolsDataSource() string

HclAgentPoolsDataSource HCL describing a data source for an AzDO Agent Pools

func HclAgentQueueResource

func HclAgentQueueResource(projectName, poolName string) string

HclAgentQueueResource HCL describing an AzDO Agent Pool and Agent Queue

func HclBuildDefinitionResource

func HclBuildDefinitionResource(
	projectName string,
	buildDefinitionName string,
	buildPath string,
	repoType string,
	repoID string,
	branchName string,
	yamlPath string,
	serviceConnectionID string,
) string

HclBuildDefinitionResource HCL describing an AzDO build definition

func HclBuildDefinitionResourceBitbucket

func HclBuildDefinitionResourceBitbucket(projectName string, buildDefinitionName string, buildPath string, serviceConnectionID string) string

HclBuildDefinitionResourceBitbucket HCL describing an AzDO build definition sourced from Bitbucket

func HclBuildDefinitionResourceGitHub

func HclBuildDefinitionResourceGitHub(projectName string, buildDefinitionName string, buildPath string) string

HclBuildDefinitionResourceGitHub HCL describing an AzDO build definition sourced from GitHub

func HclBuildDefinitionResourceTfsGit

func HclBuildDefinitionResourceTfsGit(projectName string, gitRepoName string, buildDefinitionName string, buildPath string) string

HclBuildDefinitionResourceTfsGit HCL describing an AzDO build definition sourced from AzDo Git Repo

func HclBuildDefinitionWithVariables

func HclBuildDefinitionWithVariables(varValue, secretVarValue, name string) string

HclBuildDefinitionWithVariables A build definition with variables

func HclForkedGitRepoResource

func HclForkedGitRepoResource(projectName string, gitRepoName string, gitForkedRepoName string, initType string, forkedInitType string) string

HclForkedGitRepoResource HCL describing an AzDO GIT repository resource

func HclGitRepoResource

func HclGitRepoResource(projectName string, gitRepoName string, initType string) string

HclGitRepoResource HCL describing an AzDO GIT repository resource

func HclGroupDataSource

func HclGroupDataSource(projectName string, groupName string) string

HclGroupDataSource HCL describing an AzDO Group Data Source

func HclGroupMembershipDependencies

func HclGroupMembershipDependencies(projectName, groupName, userPrincipalName string) string

HclGroupMembershipDependencies all the dependencies needed to configure a group membership

func HclGroupMembershipResource

func HclGroupMembershipResource(projectName, groupName, userPrincipalName string) string

HclGroupMembershipResource full terraform stanza to standup a group membership

func HclGroupResource

func HclGroupResource(groupResourceName, projectName, groupName string) string

HclGroupResource HCL describing an AzDO group, if the projectName is empty, only a azuredevops_group instance is returned

func HclProjectDataSource

func HclProjectDataSource(projectName string) string

HclProjectDataSource HCL describing a data source for an AzDO project

func HclProjectFeatures

func HclProjectFeatures(projectName string, featureStateTestplans string, featureStateArtifacts string) string

HclProjectFeatures HCL describing an AzDO project including feature setup using azuredevops_git_repositories

func HclProjectGitRepositories

func HclProjectGitRepositories(projectName string, gitRepoName string) string

HclProjectGitRepositories HCL describing a data source for an AzDO git repo

func HclProjectResource

func HclProjectResource(projectName string) string

HclProjectResource HCL describing an AzDO project

func HclProjectResourceWithFeature

func HclProjectResourceWithFeature(projectName string, featureStateTestplans string, featureStateArtifacts string) string

HclProjectResourceWithFeature HCL describing an AzDO project including internal feature setup

func HclProjectsDataSource

func HclProjectsDataSource(projectName string) string

HclProjectsDataSource HCL describing a data source for multiple AzDO projects

func HclProjectsDataSourceWithStateAndInvalidName

func HclProjectsDataSourceWithStateAndInvalidName() string

HclProjectsDataSourceWithStateAndInvalidName creates HCL for a multi value data source for AzDo projects

func HclResourceAuthorization

func HclResourceAuthorization(resourceID string, authorized bool) string

HclResourceAuthorization HCL describing a resource authorization

func HclServiceEndpointAzureRMAutomaticResource

func HclServiceEndpointAzureRMAutomaticResource(projectName string, serviceEndpointName string) string

HclServiceEndpointAzureRMAutomaticResource HCL describing an AzDO service endpoint

func HclServiceEndpointAzureRMResource

func HclServiceEndpointAzureRMResource(projectName string, serviceEndpointName string) string

HclServiceEndpointAzureRMResource HCL describing an AzDO service endpoint

func HclServiceEndpointDockerRegistryResource

func HclServiceEndpointDockerRegistryResource(projectName string, serviceEndpointName string) string

HclServiceEndpointDockerRegistryResource HCL describing an AzDO service endpoint

func HclServiceEndpointGitHubResource

func HclServiceEndpointGitHubResource(projectName string, serviceEndpointName string) string

HclServiceEndpointGitHubResource HCL describing an AzDO service endpoint

func HclServiceEndpointKubernetesResource

func HclServiceEndpointKubernetesResource(projectName string, serviceEndpointName string, authorizationType string) string

HclServiceEndpointKubernetesResource HCL describing an AzDO kubernetes service endpoint

func HclUserEntitlementResource

func HclUserEntitlementResource(principalName string) string

HclUserEntitlementResource HCL describing an AzDO UserEntitlement

func HclVariableGroupResource

func HclVariableGroupResource(projectName string, variableGroupName string, allowAccess bool) string

HclVariableGroupResource HCL describing an AzDO variable group

func HclVariableGroupResourceKeyVault

func HclVariableGroupResourceKeyVault(variableGroupName string, allowAccess bool, keyVaultName string) string

HclVariableGroupResourceKeyVault HCL describing an AzDO variable group with key vault

func HclVariableGroupResourceKeyVaultWithProject

func HclVariableGroupResourceKeyVaultWithProject(projectName string, variableGroupName string, allowAccess bool, keyVaultName string) string

HclVariableGroupResourceKeyVaultWithProject HCL describing an AzDO project and variable group with key vault

func HclVariableGroupResourceNoSecrets

func HclVariableGroupResourceNoSecrets(projectName string, variableGroupName string, allowAccess bool) string

HclVariableGroupResourceNoSecrets Similar to HclVariableGroupResource, but without a secret variable

func PreCheck

func PreCheck(t *testing.T, additionalEnvVars *[]string)

PreCheck checks that the requisite environment variables are set

Types

This section is empty.

Jump to

Keyboard shortcuts

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