test

package
v0.0.52 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KubeConfigFake added in v0.0.52

func KubeConfigFake() *clientcmdapi.Config

func Must added in v0.0.52

func Must[T any](v T, err error) T

func ReadFile added in v0.0.52

func ReadFile(path ...string) string

func WriteObject

func WriteObject(w http.ResponseWriter, obj runtime.Object)

Types

type InOpenShiftHandler added in v0.0.52

type InOpenShiftHandler struct {
}

func (*InOpenShiftHandler) ServeHTTP added in v0.0.52

func (h *InOpenShiftHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)

type McpClient added in v0.0.52

type McpClient struct {
	*client.Client
	// contains filtered or unexported fields
}

func NewMcpClient added in v0.0.52

func NewMcpClient(t *testing.T, mcpHttpServer *server.StreamableHTTPServer) *McpClient

func (*McpClient) CallTool added in v0.0.52

func (m *McpClient) CallTool(name string, args map[string]interface{}) (*mcp.CallToolResult, error)

CallTool helper function to call a tool by name with arguments

func (*McpClient) Close added in v0.0.52

func (m *McpClient) Close()

type MockServer

type MockServer struct {
	// contains filtered or unexported fields
}

func NewMockServer

func NewMockServer() *MockServer

func (*MockServer) Close

func (m *MockServer) Close()

func (*MockServer) Config

func (m *MockServer) Config() *rest.Config

func (*MockServer) Handle

func (m *MockServer) Handle(handler http.Handler)

func (*MockServer) Kubeconfig added in v0.0.52

func (m *MockServer) Kubeconfig() *api.Config

func (*MockServer) KubeconfigFile added in v0.0.52

func (m *MockServer) KubeconfigFile(t *testing.T) string

type StreamContext

type StreamContext struct {
	Closer       io.Closer
	StdinStream  io.ReadCloser
	StdoutStream io.WriteCloser
	StderrStream io.WriteCloser
	// contains filtered or unexported fields
}

func CreateHTTPStreams

func CreateHTTPStreams(w http.ResponseWriter, req *http.Request, opts *StreamOptions) (*StreamContext, error)

type StreamOptions

type StreamOptions struct {
	Stdin  io.Reader
	Stdout io.Writer
	Stderr io.Writer
}

Jump to

Keyboard shortcuts

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