testgateway

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package testgateway provides a fake cluster-gateway HTTP server for controller tests. It is only intended to be imported from _test.go files.

This is a separate package from testutils because StartFakeGateway returns *gateway.Client, a concrete internal type that would force internal/clients/gateway into testutils' import graph. testutils stays generic (controller-runtime interfaces only, zero internal imports); gateway-specific test infrastructure lives here instead.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartFakeGateway

func StartFakeGateway(notifyCode int, statusResp *gw.PlaneConnectionStatus) (*gw.Client, *int, func())

StartFakeGateway starts a minimal HTTP server mimicking the cluster-gateway API. POST requests (notify) return notifyCode; GET requests (status) return statusResp (nil → 500). Returns the configured client, a pointer to the notify call count, and a shutdown function.

Types

This section is empty.

Jump to

Keyboard shortcuts

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