Documentation ¶
Index ¶
- Constants
- Variables
- func AfterTest(t *testing.T, suite string, test string)
- func BeforeTest(t *testing.T, suite string, test string)
- func CreateNewQueue(ctx context.Context, _require *require.Assertions, queueName string, ...) *azqueue.QueueClient
- func DeleteQueue(ctx context.Context, _require *require.Assertions, ...)
- func GenerateEntityName(testName string) string
- func GenerateName(prefix string) string
- func GenerateQueueName(testName string) string
- func GetAccountInfo(accountType TestAccountType) (string, string)
- func GetConnectionString(accountType TestAccountType) string
- func GetGenericCredential(accountType TestAccountType) (*azqueue.SharedKeyCredential, error)
- func GetQueueClient(queueName string, serviceClient *azqueue.ServiceClient) *azqueue.QueueClient
- func GetRequiredEnv(name string) (string, error)
- func GetServiceClient(t *testing.T, accountType TestAccountType, options *azqueue.ClientOptions) (*azqueue.ServiceClient, error)
- func GetServiceClientFromConnectionString(t *testing.T, accountType TestAccountType, options *azqueue.ClientOptions) (*azqueue.ServiceClient, error)
- func ValidateHTTPErrorCode(_require *require.Assertions, err error, code int)
- func ValidateQueueErrorCode(_require *require.Assertions, err error, code queueerror.Code)
- type TestAccountType
Constants ¶
View Source
const ( DefaultEndpointSuffix = "core.windows.net/" DefaultQueueEndpointSuffix = "queue.core.windows.net/" AccountNameEnvVar = "AZURE_STORAGE_ACCOUNT_NAME" AccountKeyEnvVar = "AZURE_STORAGE_ACCOUNT_KEY" DefaultEndpointSuffixEnvVar = "AZURE_STORAGE_ENDPOINT_SUFFIX" )
View Source
const ( FakeStorageAccount = "fakestorage" FakeStorageURL = "https://fakestorage.queue.core.windows.net" )
View Source
const ( QueuePrefix = "goq" QueueDefaultData = "this is some default data" )
Variables ¶
View Source
var BasicMetadata = map[string]*string{"Foo": to.Ptr("bar")}
Functions ¶
func CreateNewQueue ¶
func CreateNewQueue(ctx context.Context, _require *require.Assertions, queueName string, serviceClient *azqueue.ServiceClient) *azqueue.QueueClient
func DeleteQueue ¶
func DeleteQueue(ctx context.Context, _require *require.Assertions, queueClient *azqueue.QueueClient)
func GenerateEntityName ¶
func GenerateName ¶
func GenerateQueueName ¶
func GetAccountInfo ¶
func GetAccountInfo(accountType TestAccountType) (string, string)
func GetConnectionString ¶
func GetConnectionString(accountType TestAccountType) string
func GetGenericCredential ¶
func GetGenericCredential(accountType TestAccountType) (*azqueue.SharedKeyCredential, error)
func GetQueueClient ¶
func GetQueueClient(queueName string, serviceClient *azqueue.ServiceClient) *azqueue.QueueClient
func GetRequiredEnv ¶
GetRequiredEnv gets an environment variable by name and returns an error if it is not found
func GetServiceClient ¶
func GetServiceClient(t *testing.T, accountType TestAccountType, options *azqueue.ClientOptions) (*azqueue.ServiceClient, error)
func GetServiceClientFromConnectionString ¶
func GetServiceClientFromConnectionString(t *testing.T, accountType TestAccountType, options *azqueue.ClientOptions) (*azqueue.ServiceClient, error)
func ValidateHTTPErrorCode ¶
func ValidateHTTPErrorCode(_require *require.Assertions, err error, code int)
func ValidateQueueErrorCode ¶
func ValidateQueueErrorCode(_require *require.Assertions, err error, code queueerror.Code)
Types ¶
type TestAccountType ¶
type TestAccountType string
const ( TestAccountDefault TestAccountType = "" TestAccountSecondary TestAccountType = "SECONDARY_" TestAccountPremium TestAccountType = "PREMIUM_" )
Click to show internal directories.
Click to hide internal directories.