test

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: Apache-2.0 Imports: 26 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UUT_IMAGES_KEY     = "UUT_IMAGES"
	UUT_CONFIG_KEY     = "crossplane/provider-cloudfoundry"
	UUT_CONTROLLER_KEY = "crossplane/provider-cloudfoundry-controller"
	UUIDRegex          = regexp.MustCompile(`^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$`)
)

Functions

func ApplySecretInCrossplaneNamespace

func ApplySecretInCrossplaneNamespace(name string, data map[string]string) env.Func

ApplySecretInCrossplaneNamespace creates or updates a Kubernetes secret in the crossplane-system namespace.

func CreateProviderConfig

func CreateProviderConfig(
	ctx context.Context,
	cfg *envconf.Config,
	namespace string,
	cfEndpoint string,
	secretName string,
) error

CreateProviderConfig contains the core logic for creating or updating a ProviderConfig. Returns an error if the operation fails.

func DeleteResourcesFromDirsGracefully

func DeleteResourcesFromDirsGracefully(ctx context.Context, cfg *envconf.Config, resourceDirs []string, timeout wait.Option) error

func GetCFCredentialsOrPanic

func GetCFCredentialsOrPanic() map[string]string

GetCFCredentialsOrPanic retrieves CloudFoundry credentials from environment variables and returns them as a map suitable for creating a Kubernetes secret

Required environment variables:

  • CF_EMAIL: Email address for CF authentication
  • CF_USERNAME: Username for CF authentication
  • CF_PASSWORD: Password for CF authentication

Returns: map with "credentials" key containing JSON-encoded credentials

func GetImagesFromJsonOrPanic

func GetImagesFromJsonOrPanic(imagesJSON string) (string, *string)

GetImagesFromJsonOrPanic retrieves and validates the package and optional controller images from UUT_IMAGES.

func GetObjectsToImport

func GetObjectsToImport(ctx context.Context, cfg *envconf.Config, dirs []string) ([]k8s.Object, error)

func LoadUpgradePackages

func LoadUpgradePackages(fromTag, toTag string, fromPackage, toPackage string) (string, string)

LoadUpgradePackages resolves provider packages for upgrade tests. Returns: fromProviderPackage, toProviderPackage

func ParseImagesFromJSON added in v1.3.0

func ParseImagesFromJSON(imagesJSON string) (string, *string, error)

ParseImagesFromJSON validates the UUT_IMAGES mapping and returns the required package image and the optional controller image. A missing controller key is represented by nil; a supplied empty controller value is invalid.

func SetupLogging

func SetupLogging(verbosity int)

SetupLogging configures klog and controller-runtime logging with the specified verbosity

Types

type CFCredentials

type CFCredentials struct {
	Email    string `json:"email"`
	Username string `json:"username"`
	Password string `json:"password"` //nolint:gosec
}

CFCredentials represents the CloudFoundry credentials structure

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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