envar

package
v6.5.2 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// IonosToken is the environment variable name for the Ionos Cloud API token.
	IonosToken = "IONOS_TOKEN"
	// IonosUsername is the environment variable name for the Ionos Cloud API username.
	IonosUsername = "IONOS_USERNAME"
	// IonosPassword is the environment variable name for the Ionos Cloud API password.
	IonosPassword = "IONOS_PASSWORD"
	// IonosS3AccessKey is the environment variable name for the Ionos Cloud S3 access key.
	IonosS3AccessKey = "IONOS_S3_ACCESS_KEY"
	// IonosS3SecretKey is the environment variable name for the Ionos Cloud S3 secret key.
	IonosS3SecretKey = "IONOS_S3_SECRET_KEY"
)

Variables

This section is empty.

Functions

func FailIfAllEmpty

func FailIfAllEmpty(t *testing.T, names []string, usageMessage string) (string, string)

FailIfAllEmpty verifies that at least one environment variable is non-empty or fails the test.

If at least one environment variable is non-empty, returns the first name and value.

func FailIfEmpty

func FailIfEmpty(t *testing.T, name string, usageMessage string) string

FailIfEmpty verifies that an environment variable is non-empty or fails the test.

For acceptance tests, this function must be used outside PreCheck functions to set values for configurations.

func Require

func Require(name string, usageMessage string) (string, error)

Require verifies that an environment variable is non-empty or returns an error.

func RequireOneOf

func RequireOneOf(names []string, usageMessage string) (string, string, error)

RequireOneOf verifies that at least one environment variable is non-empty or returns an error.

func SkipIfAllEmpty

func SkipIfAllEmpty(t *testing.T, names []string, usageMessage string) (string, string)

SkipIfAllEmpty verifies that at least one environment variable is non-empty or skips the test.

If at least one environment variable is non-empty, returns the first name and value.

func SkipIfEmpty

func SkipIfEmpty(t *testing.T, name string, usageMessage string) string

SkipIfEmpty verifies that an environment variable is non-empty or skips the test.

For acceptance tests, this function must be used outside PreCheck functions to set values for configurations.

Types

This section is empty.

Jump to

Keyboard shortcuts

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