Documentation
¶
Index ¶
- Constants
- func GetNonEmptyLines(output string) []string
- func GetProjectDir() (string, error)
- func GitServerClusterURL(repo string) string
- func GitServerLocalURL(repo string) string
- func InstallCertManager() error
- func IsCertManagerCRDsInstalled() bool
- func KindClusterName() string
- func LoadImageToKindClusterWithName(name string) error
- func Run(cmd *exec.Cmd) (string, error)
- func UncommentCode(filename, target, prefix string) error
- func UninstallCertManager()
- type PortForward
- type Repo
- func (r *Repo) Commit(files map[string]string, message string) (string, error)
- func (r *Repo) CommitPush(files map[string]string, message string) (string, error)
- func (r *Repo) Head() string
- func (r *Repo) Push(force bool) error
- func (r *Repo) PushFile(path, content, message string) (string, error)
- func (r *Repo) Rewrite(files map[string]string, message string) (string, error)
Constants ¶
const ( // GitServerNamespace is where the e2e git server (and the fixture fleet) // lives. GitServerNamespace = "wavefront-e2e" // GitServerService is the Service in front of the git server; its // in-cluster address is what the fixture GitRepositories point at. GitServerService = "gitserver" // GitServerPort is the port the git server listens on. GitServerPort = 8080 // GitServerLocalPort is the host-side end of the port-forward the suite // pushes through. GitServerLocalPort = 18080 // GitBranch is the branch every fixture repository tracks. GitBranch = "main" )
Variables ¶
This section is empty.
Functions ¶
func GetNonEmptyLines ¶
GetNonEmptyLines converts given command output string into individual objects according to line breakers, and ignores the empty elements in it.
func GetProjectDir ¶
GetProjectDir will return the directory where the project is
func GitServerClusterURL ¶
GitServerClusterURL is the in-cluster URL of one repository.
func GitServerLocalURL ¶
GitServerLocalURL is the push URL of one repository on the git server, as reached from the host through the port-forward. The in-cluster URL that goes into a GitRepository spec addresses the very same repositories.
func InstallCertManager ¶
func InstallCertManager() error
InstallCertManager installs the cert manager bundle.
func IsCertManagerCRDsInstalled ¶
func IsCertManagerCRDsInstalled() bool
IsCertManagerCRDsInstalled checks if any Cert Manager CRDs are installed by verifying the existence of key CRDs related to Cert Manager.
func KindClusterName ¶
func KindClusterName() string
KindClusterName is the kind cluster the suite is allowed to touch: KIND_CLUSTER as `make test-e2e` sets it, or kind's own default.
func LoadImageToKindClusterWithName ¶
LoadImageToKindClusterWithName loads a local docker image to the kind cluster
func UncommentCode ¶
UncommentCode searches for target in the file and remove the comment prefix of the target content. The target content may span multiple lines.
func UninstallCertManager ¶
func UninstallCertManager()
UninstallCertManager uninstalls the cert manager
Types ¶
type PortForward ¶
type PortForward struct {
// contains filtered or unexported fields
}
PortForward supervises a `kubectl port-forward` for the lifetime of the suite. kubectl gives up on its side of a dropped connection, so the forward is restarted rather than trusted to survive a whole e2e run unattended.
func StartPortForward ¶
func StartPortForward(namespace, service string, local, remote int) *PortForward
StartPortForward launches the supervised forward. Call WaitReady before using it.
func (*PortForward) Stop ¶
func (f *PortForward) Stop()
Stop tears the forward down and waits for the supervisor to exit.
type Repo ¶
type Repo struct {
Name string
// contains filtered or unexported fields
}
Repo is a local working copy wired to one repository on the e2e git server. The server auto-creates repositories on first push, so seeding a fixture repository is just a commit away.
func (*Repo) CommitPush ¶
CommitPush is the workhorse: commit files, push, return the new SHA.