test

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package test contains test utilities for the fleetconfig-controller project.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindEnvTestBinaryDir

func FindEnvTestBinaryDir(c *Config) string

FindEnvTestBinaryDir locates the first binary in the specified path. ENVTEST-based tests depend on specific binaries, usually located in paths set by controller-runtime. When running tests directly (e.g., via an IDE) without using Makefile targets, the 'BinaryAssetsDirectory' must be explicitly configured.

This function streamlines the process by finding the required binaries, similar to setting the 'KUBEBUILDER_ASSETS' environment variable. To ensure the binaries are properly set up, run 'make setup-envtest' beforehand.

func GetProjectDir added in v0.0.13

func GetProjectDir() (string, error)

GetProjectDir returns the fleetconfig-controller project root directory. It works by finding "fleetconfig-controller" in the current working directory path.

Types

type Config

type Config struct {
	EnvTestK8sVersion string `json:"envTestK8sVersion"`
	FullTrace         bool   `json:"fullTrace"`
	LabelFilter       string `json:"labelFilter"`
	Verbose           bool   `json:"verbose"`
}

Config is a struct to hold global integration test configuration.

func LoadConfig

func LoadConfig() (*Config, error)

LoadConfig centralized test config from disk.

Jump to

Keyboard shortcuts

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