package integration
import "github.com/oslokommune/okctl/pkg/integration"
Package integration implements functionality for more easily running integration tests
Index ¶
- func RandStringBytes(n int) string
- type KubernetesCluster
- func NewKubernetesCluster() *KubernetesCluster
- func (k *KubernetesCluster) Cleanup() error
- func (k *KubernetesCluster) Create(timeout time.Duration) error
- func (k *KubernetesCluster) Debug(namespace string) (map[string][]string, error)
- func (k *KubernetesCluster) Destroy() error
- func (k *KubernetesCluster) KubeConfig() (string, error)
- type Localstack
Functions ¶
func RandStringBytes ¶
RandStringBytes returns a random string https://stackoverflow.com/questions/22892120/how-to-generate-a-random-string-of-a-fixed-length-in-go/22892986#22892986
Types ¶
type KubernetesCluster ¶
type KubernetesCluster struct {
// contains filtered or unexported fields
}
KubernetesCluster contains all state for creating a kubernetes cluster
func NewKubernetesCluster ¶
func NewKubernetesCluster() *KubernetesCluster
NewKubernetesCluster returns an initialised struct for managing kubernetes clusters
func (*KubernetesCluster) Cleanup ¶
func (k *KubernetesCluster) Cleanup() error
Cleanup removes all created resources
func (*KubernetesCluster) Create ¶
func (k *KubernetesCluster) Create(timeout time.Duration) error
Create a kubernetes cluster
func (*KubernetesCluster) Debug ¶
func (k *KubernetesCluster) Debug(namespace string) (map[string][]string, error)
Debug returns podspecs, podlogs and events generated in a given namespace nolint: funlen
func (*KubernetesCluster) Destroy ¶
func (k *KubernetesCluster) Destroy() error
Destroy removes the cluster
func (*KubernetesCluster) KubeConfig ¶
func (k *KubernetesCluster) KubeConfig() (string, error)
KubeConfig writes the kubeconfig to a temporary file and returns the path to that file
type Localstack ¶
type Localstack struct {
// contains filtered or unexported fields
}
Localstack contains all state for managing the lifecycle of the localstack instance
func NewLocalstack ¶
func NewLocalstack() *Localstack
NewLocalstack returns initialised localstack state
func (*Localstack) AWSSession ¶
func (l *Localstack) AWSSession() *session.Session
AWSSession returns an AWS session that works with the localstack instance
func (*Localstack) Cleanup ¶
func (l *Localstack) Cleanup() error
Cleanup removes all resources created by localstack
func (*Localstack) Create ¶
func (l *Localstack) Create(timeout time.Duration) error
Create a localstack instance
func (*Localstack) Health ¶
func (l *Localstack) Health() error
Health returns nil if the localstack instance is up and running
func (*Localstack) Logs ¶
func (l *Localstack) Logs() (string, error)
Logs retrieves the logs from the localstack instance
Source Files ¶
- Version
- v0.0.106 (latest)
- Published
- Oct 21, 2022
- Platform
- linux/amd64
- Imports
- 22 packages
- Last checked
- 18 hours ago –
Tools for package owners.