testutils

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package testutils provides test utility functions for the CLI package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTestKubeconfig

func CreateTestKubeconfig(t *testing.T) string

CreateTestKubeconfig creates a temporary kubeconfig file for testing

func ReadKubeconfigExtension

func ReadKubeconfigExtension(t *testing.T, kubeconfigPath, extensionName string, target interface{}) (bool, error)

ReadKubeconfigExtension reads and unmarshals a kubeconfig extension into the provided target The target parameter should be a pointer to the struct you want to unmarshal into Returns true if the extension was found and unmarshaled successfully, false if not found

func ReadKubeconfigExtensionRaw

func ReadKubeconfigExtensionRaw(t *testing.T, kubeconfigPath, extensionName string) ([]byte, error)

ReadKubeconfigExtensionRaw reads the tekton-results extension from a kubeconfig file as raw data This avoids import cycles by not depending on config package types

Types

This section is empty.

Jump to

Keyboard shortcuts

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