Documentation
¶
Index ¶
- Constants
- type MCPRemoteProxyTestHelper
- func (h *MCPRemoteProxyTestHelper) CleanupRemoteProxies() error
- func (h *MCPRemoteProxyTestHelper) GetRemoteProxy(name string) (*mcpv1alpha1.MCPRemoteProxy, error)
- func (h *MCPRemoteProxyTestHelper) GetRemoteProxyCondition(name, conditionType string) (*metav1.Condition, error)
- func (h *MCPRemoteProxyTestHelper) GetRemoteProxyPhase(name string) (mcpv1alpha1.MCPRemoteProxyPhase, error)
- func (h *MCPRemoteProxyTestHelper) GetRemoteProxyStatus(name string) (*mcpv1alpha1.MCPRemoteProxyStatus, error)
- func (h *MCPRemoteProxyTestHelper) NewRemoteProxyBuilder(name string) *RemoteProxyBuilder
- type RemoteProxyBuilder
- type RemoteProxyStatusTestHelper
Constants ¶
const ( // MediumTimeout for operations that may take some time (e.g., controller reconciliation) MediumTimeout = 30 * time.Second // LongTimeout for operations that may take a while (e.g., sync operations) LongTimeout = 2 * time.Minute // DefaultPollingInterval for Eventually/Consistently checks DefaultPollingInterval = 1 * time.Second )
Common timeout values for different types of operations
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MCPRemoteProxyTestHelper ¶
type MCPRemoteProxyTestHelper struct {
Client client.Client
Context context.Context
Namespace string
}
MCPRemoteProxyTestHelper provides specialized utilities for MCPRemoteProxy testing
func NewMCPRemoteProxyTestHelper ¶
func NewMCPRemoteProxyTestHelper( ctx context.Context, k8sClient client.Client, namespace string, ) *MCPRemoteProxyTestHelper
NewMCPRemoteProxyTestHelper creates a new test helper for MCPRemoteProxy operations
func (*MCPRemoteProxyTestHelper) CleanupRemoteProxies ¶
func (h *MCPRemoteProxyTestHelper) CleanupRemoteProxies() error
CleanupRemoteProxies deletes all MCPRemoteProxies in the namespace
func (*MCPRemoteProxyTestHelper) GetRemoteProxy ¶
func (h *MCPRemoteProxyTestHelper) GetRemoteProxy(name string) (*mcpv1alpha1.MCPRemoteProxy, error)
GetRemoteProxy retrieves an MCPRemoteProxy by name
func (*MCPRemoteProxyTestHelper) GetRemoteProxyCondition ¶
func (h *MCPRemoteProxyTestHelper) GetRemoteProxyCondition( name, conditionType string, ) (*metav1.Condition, error)
GetRemoteProxyCondition returns a specific condition from the proxy status
func (*MCPRemoteProxyTestHelper) GetRemoteProxyPhase ¶
func (h *MCPRemoteProxyTestHelper) GetRemoteProxyPhase( name string, ) (mcpv1alpha1.MCPRemoteProxyPhase, error)
GetRemoteProxyPhase returns the current phase of an MCPRemoteProxy
func (*MCPRemoteProxyTestHelper) GetRemoteProxyStatus ¶
func (h *MCPRemoteProxyTestHelper) GetRemoteProxyStatus( name string, ) (*mcpv1alpha1.MCPRemoteProxyStatus, error)
GetRemoteProxyStatus returns the current status of an MCPRemoteProxy
func (*MCPRemoteProxyTestHelper) NewRemoteProxyBuilder ¶
func (h *MCPRemoteProxyTestHelper) NewRemoteProxyBuilder(name string) *RemoteProxyBuilder
NewRemoteProxyBuilder creates a new MCPRemoteProxy builder with sensible defaults for required fields (RemoteURL, OIDCConfig) so tests only need to override what they're testing
type RemoteProxyBuilder ¶
type RemoteProxyBuilder struct {
// contains filtered or unexported fields
}
RemoteProxyBuilder provides a fluent interface for building MCPRemoteProxy objects
func (*RemoteProxyBuilder) Create ¶
func (rb *RemoteProxyBuilder) Create(h *MCPRemoteProxyTestHelper) *mcpv1alpha1.MCPRemoteProxy
Create builds and creates the MCPRemoteProxy in the cluster
func (*RemoteProxyBuilder) WithPort ¶
func (rb *RemoteProxyBuilder) WithPort(port int32) *RemoteProxyBuilder
WithPort sets the port for the proxy
type RemoteProxyStatusTestHelper ¶
type RemoteProxyStatusTestHelper struct {
// contains filtered or unexported fields
}
RemoteProxyStatusTestHelper provides utilities for MCPRemoteProxy status testing and validation
func NewRemoteProxyStatusTestHelper ¶
func NewRemoteProxyStatusTestHelper( ctx context.Context, k8sClient client.Client, namespace string, ) *RemoteProxyStatusTestHelper
NewRemoteProxyStatusTestHelper creates a new test helper for status operations
func (*RemoteProxyStatusTestHelper) WaitForPhaseAny ¶
func (h *RemoteProxyStatusTestHelper) WaitForPhaseAny( proxyName string, expectedPhases []mcpv1alpha1.MCPRemoteProxyPhase, timeout time.Duration, )
WaitForPhaseAny waits for an MCPRemoteProxy to reach any of the specified phases
func (*RemoteProxyStatusTestHelper) WaitForURL ¶
func (h *RemoteProxyStatusTestHelper) WaitForURL(proxyName string, timeout time.Duration)
WaitForURL waits for the URL to be set in the status