Documentation
¶
Index ¶
- Constants
- Variables
- func CaptureLogEntries(run func()) string
- func GetFreePort() (int, error)
- func GetTestDir(t *testing.T) string
- func MustLoadFileToString(path string) string
- func NewConfigMap() *unstructured.Unstructured
- func NewControllerRevision() *unstructured.Unstructured
- func NewDeployment() *unstructured.Unstructured
- func NewFakeConfigMap() *corev1.ConfigMap
- func NewFakeProjLister(objects ...runtime.Object) applister.AppProjectNamespaceLister
- func NewFakeProjListerFromInterface(appProjects appclient.AppProjectInterface) applister.AppProjectNamespaceLister
- func NewFakeSecret() *corev1.Secret
- func NewInMemoryRedis() (*kv.Client, func())
- func StartInformer(informer cache.SharedIndexInformer) context.CancelFunc
- func ToMap(obj any) map[string]any
- func WaitForPortListen(addr string, timeout time.Duration) error
- func YamlToApplication(yamlStr string) *v1alpha1.Application
- func YamlToUnstructured(yamlStr string) *unstructured.Unstructured
Constants ¶
View Source
const ( FakeArgoCDNamespace = "fake-cd-ns" FakeDestNamespace = "fake-dest-ns" FakeClusterURL = "https://fake-cluster:443" )
Variables ¶
View Source
var ConfigMapManifest = `` /* 162-byte string literal not displayed */
View Source
var DeploymentManifest = `` /* 627-byte string literal not displayed */
Functions ¶
func CaptureLogEntries ¶ added in v1.8.8
func CaptureLogEntries(run func()) string
CaptureLogEntries captures log entries generated by the logger and return it as string
func GetFreePort ¶ added in v0.11.0
GetFreePort finds an available free port on the OS
func GetTestDir ¶ added in v1.8.8
GetTestDir will return the full directory path of the calling test file.
func MustLoadFileToString ¶ added in v1.8.8
Read the contents of a file and returns it as string. Panics on error.
func NewConfigMap ¶ added in v1.8.8
func NewConfigMap() *unstructured.Unstructured
func NewControllerRevision ¶ added in v1.4.0
func NewControllerRevision() *unstructured.Unstructured
func NewDeployment ¶ added in v0.11.0
func NewDeployment() *unstructured.Unstructured
func NewFakeConfigMap ¶ added in v0.11.1
func NewFakeProjLister ¶ added in v0.11.1
func NewFakeProjLister(objects ...runtime.Object) applister.AppProjectNamespaceLister
func NewFakeProjListerFromInterface ¶ added in v1.8.8
func NewFakeProjListerFromInterface(appProjects appclient.AppProjectInterface) applister.AppProjectNamespaceLister
func NewFakeSecret ¶ added in v0.11.1
func NewInMemoryRedis ¶ added in v1.8.8
func NewInMemoryRedis() (*kv.Client, func())
func StartInformer ¶ added in v0.11.0
func StartInformer(informer cache.SharedIndexInformer) context.CancelFunc
StartInformer is a helper to start an informer, wait for its cache to sync and return a cancel func
func WaitForPortListen ¶ added in v0.11.0
WaitForPortListen waits until the given address is listening on the port
func YamlToApplication ¶ added in v1.8.8
func YamlToApplication(yamlStr string) *v1alpha1.Application
func YamlToUnstructured ¶ added in v1.8.8
func YamlToUnstructured(yamlStr string) *unstructured.Unstructured
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.