{"modulePath":"github.com/Stackdome/stackdome","version":"v0.0.7-alpha","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package testutil\n\n## Constants\n\n```go\nconst (\n\t// Stackdome agent Helm chart (bundles cluster-agent + all dependencies)\n\tDefaultChartVersion = \"0.6.12-alpha-rc1\"\n\tChartRepo           = \"oci://quay.io/stackdome/charts/stackdome-agent\"\n\tChartReleaseName    = \"stackdome-agent\"\n\tChartNamespace      = \"stackdome-control-plane\"\n\n\t// MinIO (S3-compatible object storage for backup tests)\n\tMinIOImage       = \"minio/minio:latest\"\n\tMinIOClientImage = \"minio/mc:latest\"\n\tMinIONamespace   = \"stackdome-system\"\n\tMinIOName        = \"minio\"\n\tMinIOServicePort = 9000\n\tMinIOAccessKey   = \"minioadmin\"\n\tMinIOSecretKey   = \"minioadmin\"\n\tMinIOBucket      = \"backups\"\n)\n```\n\n```go\nconst (\n\tHelmVersion = \"v3.14.0\"\n)\n```\n\n## Functions\n\n```go\nfunc EnsureHelm(ctx context.Context) (string, error)\n```\nEnsureHelm returns the path to a working helm binary, installing it if necessary.\n\n```go\nfunc GetChartVersion() string\n```\nGetChartVersion returns the stackdome-agent chart version, checking environment variables.\n\n```go\nfunc LoadKubernetesObjectsFromBytes(fileYaml []byte) ([]unstructured.Unstructured, error)\n```\n\n```go\nfunc MinIOEndpoint() string\n```\nMinIOEndpoint returns the in-cluster endpoint for the MinIO service.\n\n```go\nfunc NewGitHubLoader(ctx context.Context, options ...func(*githubLoader)) *githubLoader\n```\n\n```go\nfunc WithCacheDir(cacheDir string) func(*githubLoader)\n```\n\n```go\nfunc WithPathsToLoad(paths []string) func(*githubLoader)\n```\n\n```go\nfunc WithRepoName(repo string) func(*githubLoader)\n```\n\n```go\nfunc WithRepoOwner(owner string) func(*githubLoader)\n```\n\n```go\nfunc WithRepoTag(tag string) func(*githubLoader)\n```\n\n## Types\n\n```go\ntype ClusterConfig struct {\n\tName             string\n\tCacheDir         string\n\tNodeCount        int\n\tInstallOperators bool\n\tContainerRuntime string\n\tLogger           logr.Logger\n}\n```\nClusterConfig holds configuration for test cluster setup\n\n```go\nfunc DefaultClusterConfig(name string, logger logr.Logger) *ClusterConfig\n```\nDefaultClusterConfig returns a default configuration for test clusters\n\n```go\ntype TestCluster struct {\n\t// contains filtered or unexported fields\n}\n```\nTestCluster manages a test Kubernetes cluster\n\n```go\nfunc NewTestCluster(config *ClusterConfig) *TestCluster\n```\nNewTestCluster creates a new test cluster manager\n\n```go\nfunc NewTestClusterFromKubeconfig(kubeconfigPath string, logger logr.Logger) (*TestCluster, error)\n```\nNewTestClusterFromKubeconfig creates a TestCluster backed by an existing kubeconfig file.\n\n```go\nfunc NewTestClusterFromRESTConfig(cfg *rest.Config, logger logr.Logger) *TestCluster\n```\nNewTestClusterFromRESTConfig creates a TestCluster from an existing REST config.\n\n```go\nfunc (tc *TestCluster) GetClient() client.Client\n```\nGetClient returns a Kubernetes client for the test cluster\n\n```go\nfunc (tc *TestCluster) GetKubeClient() (*kubernetes.Clientset, error)\n```\nGetKubeClient returns a kubernetes.Interface client for the test cluster\n\n```go\nfunc (tc *TestCluster) GetKubeConfig() (*rest.Config, error)\n```\nGetKubeConfig returns the REST config for the test cluster (alias for GetRESTConfig)\n\n```go\nfunc (tc *TestCluster) GetRESTConfig() *rest.Config\n```\nGetRESTConfig returns the REST config for the test cluster\n\n```go\nfunc (tc *TestCluster) LoadImage(imagePath string) error\n```\nLoadImage loads a container image into the cluster\n\n```go\nfunc (tc *TestCluster) Setup(ctx context.Context) error\n```\nSetup creates and initializes the test cluster\n\n```go\nfunc (tc *TestCluster) Teardown(ctx context.Context) error\n```\nTeardown destroys the test cluster\n\n","path":"github.com/Stackdome/stackdome/pkg/testutil","name":"testutil","synopsis":"","isRedistributable":true}
