installtest

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: Apache-2.0 Imports: 7 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

Overview

Package installtest provides fakes for testing Install runs without a cluster, a registry or GitHub.

Index

Constants

View Source
const Manifest = "kind: Job\nimage: " + platforminstaller.ImageRepo + ":latest\n"

Manifest is what Upstream serves as the installer manifest.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster struct {

	// Calls lists namespace and job operations in order.
	Calls []string
	// Secret holds the installer's Secret values, Manifest the applied installer manifests.
	Secret   map[string]string
	Manifest string
	// DNSData holds secrets created with raw data, by "namespace/name".
	DNSData map[string]map[string][]byte

	// Secrets are the values SecretValue answers with, by "namespace/name/key".
	Secrets map[string]string
	// Hosts are the ingress hosts reported once the platform is installed.
	Hosts []string
	// LBAddr is the LoadBalancer address.
	LBAddr string

	// JobFails makes the installer Job fail. NotAdmin and NoStorageClass make the preflight checks fail.
	JobFails       bool
	NotAdmin       bool
	NoStorageClass bool
	// contains filtered or unexported fields
}

Cluster is a cluster on which the platform installer succeeds right away. It records what was applied.

func (*Cluster) ApplyManifests

func (c *Cluster) ApplyManifests(_ context.Context, m []byte) error

func (*Cluster) ApplySecret

func (c *Cluster) ApplySecret(_ context.Context, _, _ string, values map[string]string) error

func (*Cluster) ApplySecretData

func (c *Cluster) ApplySecretData(_ context.Context, ns, name string, data map[string][]byte) error

func (*Cluster) DeleteJob

func (c *Cluster) DeleteJob(context.Context, string, string) error

func (*Cluster) EnsureNamespace

func (c *Cluster) EnsureNamespace(_ context.Context, name string) error

func (*Cluster) HasDefaultStorageClass

func (c *Cluster) HasDefaultStorageClass(context.Context) (bool, error)

func (*Cluster) IngressHosts

func (c *Cluster) IngressHosts(context.Context) ([]string, error)

func (*Cluster) IsClusterAdmin

func (c *Cluster) IsClusterAdmin(context.Context) (bool, error)

func (*Cluster) JobDiagnostics

func (c *Cluster) JobDiagnostics(context.Context, string, string) string

func (*Cluster) LoadBalancerAddress

func (c *Cluster) LoadBalancerAddress(context.Context, string) (string, error)

func (*Cluster) SecretValue

func (c *Cluster) SecretValue(_ context.Context, ns, name, key string) (string, error)

func (*Cluster) StreamLogs

func (c *Cluster) StreamLogs(context.Context, string, string, io.Writer) error

func (*Cluster) WaitForJob

func (c *Cluster) WaitForJob(context.Context, string, string) (bool, error)

func (*Cluster) WaitForJobPod

func (c *Cluster) WaitForJobPod(context.Context, string, string) (string, error)

type KindClusters

type KindClusters struct {
	// Existing is whether a cluster of the asked name exists.
	Existing bool
	// Calls lists "create <name>" and "delete <name>" in order.
	Calls []string
	// Cluster is what Connect returns.
	Cluster install.Cluster
	// ConnectErr makes Connect fail.
	ConnectErr error
}

KindClusters are kind clusters that exist only as a record of what was done to them.

func (*KindClusters) Connect

func (k *KindClusters) Connect(string) (install.Cluster, error)

func (*KindClusters) Create

func (k *KindClusters) Create(name string) error

func (*KindClusters) Delete

func (k *KindClusters) Delete(name string) error

func (*KindClusters) Exists

func (k *KindClusters) Exists(string) (bool, error)

type Upstream

type Upstream struct {
	URL     string
	AppList []string
	Images  []string
}

Upstream is a kubriX source that serves a fixed app list and the manifest above. The installer image exists for the tags in Images; GitURL points at URL, e.g. a testrepo upstream.

func (Upstream) Apps

func (Upstream) GitURL

func (u Upstream) GitURL(string) string

func (Upstream) ImageTagExists

func (u Upstream) ImageTagExists(_ context.Context, tag string) (bool, error)

func (Upstream) Manifest

func (u Upstream) Manifest(context.Context, string, string) ([]byte, error)

Jump to

Keyboard shortcuts

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