Documentation
¶
Overview ¶
Package installtest provides fakes for testing Install runs without a cluster, a registry or GitHub.
Index ¶
- Constants
- type Cluster
- func (c *Cluster) ApplyManifests(_ context.Context, m []byte) error
- func (c *Cluster) ApplySecret(_ context.Context, _, _ string, values map[string]string) error
- func (c *Cluster) ApplySecretData(_ context.Context, ns, name string, data map[string][]byte) error
- func (c *Cluster) DeleteJob(context.Context, string, string) error
- func (c *Cluster) EnsureNamespace(_ context.Context, name string) error
- func (c *Cluster) HasDefaultStorageClass(context.Context) (bool, error)
- func (c *Cluster) IngressHosts(context.Context) ([]string, error)
- func (c *Cluster) IsClusterAdmin(context.Context) (bool, error)
- func (c *Cluster) JobDiagnostics(context.Context, string, string) string
- func (c *Cluster) LoadBalancerAddress(context.Context, string) (string, error)
- func (c *Cluster) SecretValue(_ context.Context, ns, name, key string) (string, error)
- func (c *Cluster) StreamLogs(context.Context, string, string, io.Writer) error
- func (c *Cluster) WaitForJob(context.Context, string, string) (bool, error)
- func (c *Cluster) WaitForJobPod(context.Context, string, string) (string, error)
- type KindClusters
- type Upstream
Constants ¶
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 (*Cluster) ApplySecret ¶
func (*Cluster) ApplySecretData ¶
func (*Cluster) EnsureNamespace ¶
func (*Cluster) HasDefaultStorageClass ¶
func (*Cluster) JobDiagnostics ¶
func (*Cluster) LoadBalancerAddress ¶
func (*Cluster) SecretValue ¶
func (*Cluster) StreamLogs ¶
func (*Cluster) WaitForJob ¶
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) Create ¶
func (k *KindClusters) Create(name string) error
func (*KindClusters) Delete ¶
func (k *KindClusters) Delete(name string) error