cloudtest

package
v0.23.1 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AWSApiECRHost   = "api.ecr.eu-north-1.amazonaws.com"
	AWSRegistryHost = "account-id.dkr.ecr.eu-north-1.amazonaws.com"
)
View Source
const (
	AzureAuthHost = "login.microsoftonline.com"
)

Variables

This section is empty.

Functions

func NewMetaServer added in v0.21.0

func NewMetaServer(
	azureOidcIssuerUrl string,
) (*httptest.Server, error)

NewMetaServer creates an https server, which handles all requests destined for port 443.

Types

type AWSEnvironment added in v0.17.0

type AWSEnvironment struct {
	PodIdentityAgent *httptest.Server
	ECRServer        *httptest.Server
}

A test Cloud Environment imitating AWS Pod Identity Agents and ECR auth. In order to test AWS OCI, we have to bind some hosts to localhost. We use a mock dns server to create an A record which binds api.ecr.eu-north-1.amazonaws.com and account-id.dkr.ecr.eu-north-1.amazonaws.com to 127.0.0.1. All AWS OCI tests have to use account-id.dkr.ecr.eu-north-1.amazonaws.com (ECRServer.URL) as host.

func NewAWSEnvironment added in v0.17.0

func NewAWSEnvironment(
	registryAddr string,
) (*AWSEnvironment, error)

func (*AWSEnvironment) Close added in v0.17.0

func (env *AWSEnvironment) Close()

type AzureEnvironment added in v0.19.0

type AzureEnvironment struct {
	TokenServer      *httptest.Server
	OIDCIssuerServer *httptest.Server
}

A test Cloud Environment imitating Azure Active Directory.

func NewAzureEnvironment added in v0.19.0

func NewAzureEnvironment() (*AzureEnvironment, error)

func (*AzureEnvironment) Close added in v0.19.0

func (env *AzureEnvironment) Close()

type GCPEnvironment added in v0.17.0

type GCPEnvironment struct {
	HttpsServer *httptest.Server
}

A test Cloud Environment imitating GCP Metadata Server.

func NewGCPEnvironment added in v0.17.0

func NewGCPEnvironment() (*GCPEnvironment, error)

func (*GCPEnvironment) Close added in v0.17.0

func (env *GCPEnvironment) Close()

Jump to

Keyboard shortcuts

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