azuresuite

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const RequiredEnvVars = "TEST_AZURE_SUBSCRIPTION_ID,TEST_AZURE_LOCATION"

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureTestSettings

type AzureTestSettings struct {
	SubscriptionId    string
	ResourceGroupName string
	Location          string
}

type AzureTestSuite

type AzureTestSuite struct {
	suite.Suite

	// store settings by test name
	TestSettings map[string]AzureTestSettings
}

AzureTestSuite is the base test suite for all Azure tests.

func (*AzureTestSuite) AddSettings

func (suite *AzureTestSuite) AddSettings(settings AzureTestSettings) string

func (*AzureTestSuite) CreateOrUpdateResourceGroup

func (suite *AzureTestSuite) CreateOrUpdateResourceGroup(settings AzureTestSettings)

func (*AzureTestSuite) DeleteResourceGroup

func (suite *AzureTestSuite) DeleteResourceGroup(settings AzureTestSettings)

func (*AzureTestSuite) GetCredential

func (suite *AzureTestSuite) GetCredential() *azidentity.DefaultAzureCredential

func (*AzureTestSuite) NewSettings

func (suite *AzureTestSuite) NewSettings() (AzureTestSettings, string)

creates new azure settings based on environment variables

func (*AzureTestSuite) RandomString

func (suite *AzureTestSuite) RandomString(length uint) string

func (*AzureTestSuite) ReadJsonFile

func (suite *AzureTestSuite) ReadJsonFile(dirPath string, fileName string) map[string]any

func (*AzureTestSuite) RequireEnvVars

func (suite *AzureTestSuite) RequireEnvVars()

RequireEnvVars checks that the required environment variables are set as part of the setup.

func (*AzureTestSuite) Settings

func (suite *AzureTestSuite) Settings() AzureTestSettings

get settings using the built in active test name

func (*AzureTestSuite) SettingsByName

func (suite *AzureTestSuite) SettingsByName(testName string) (AzureTestSettings, bool)

func (*AzureTestSuite) SetupSuite

func (suite *AzureTestSuite) SetupSuite()

func (*AzureTestSuite) TearDownSuite

func (suite *AzureTestSuite) TearDownSuite()

func (*AzureTestSuite) ToJson

func (suite *AzureTestSuite) ToJson(i any) string

Jump to

Keyboard shortcuts

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