Documentation ¶
Overview ¶
Package framework is a package helping setting up end-to-end testing across a Kubernetes cluster.
Index ¶
- func FleetReadyCount(amount int32) func(fleet *v1alpha1.Fleet) bool
- func PingGameServer(msg, address string) (reply string, err error)
- type Framework
- func (f *Framework) CleanUp(ns string) error
- func (f *Framework) CreateGameServerAndWaitUntilReady(ns string, gs *v1alpha1.GameServer) (*v1alpha1.GameServer, error)
- func (f *Framework) ListGameServersFromFleet(flt *v1alpha1.Fleet) ([]v1alpha1.GameServer, error)
- func (f *Framework) WaitForFleetCondition(flt *v1alpha1.Fleet, condition func(fleet *v1alpha1.Fleet) bool) error
- func (f *Framework) WaitForFleetGameServersCondition(flt *v1alpha1.Fleet, cond func(server v1alpha1.GameServer) bool) error
- func (f *Framework) WaitForGameServerState(gs *v1alpha1.GameServer, state v1alpha1.State, timeout time.Duration) (*v1alpha1.GameServer, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FleetReadyCount ¶ added in v0.5.0
FleetReadyCountCondition checks the ready count in a fleet
func PingGameServer ¶
PingGameServer pings a gameserver and returns its reply
Types ¶
type Framework ¶
type Framework struct { KubeClient kubernetes.Interface AgonesClient versioned.Interface GameServerImage string PullSecret string }
Framework is a testing framework
func New ¶
New setups a testing framework using a kubeconfig path and the game server image to use for testing.
func (*Framework) CreateGameServerAndWaitUntilReady ¶
func (f *Framework) CreateGameServerAndWaitUntilReady(ns string, gs *v1alpha1.GameServer) (*v1alpha1.GameServer, error)
CreateGameServerAndWaitUntilReady Creates a GameServer and wait for its state to become ready.
func (*Framework) ListGameServersFromFleet ¶ added in v0.5.0
ListGameServersFromFleet lists GameServers from a particular fleet
func (*Framework) WaitForFleetCondition ¶ added in v0.5.0
func (f *Framework) WaitForFleetCondition(flt *v1alpha1.Fleet, condition func(fleet *v1alpha1.Fleet) bool) error
WaitForFleetCondition waits for the Fleet to be in a specific condition
func (*Framework) WaitForFleetGameServersCondition ¶ added in v0.5.0
func (f *Framework) WaitForFleetGameServersCondition(flt *v1alpha1.Fleet, cond func(server v1alpha1.GameServer) bool) error
WaitForFleetGameServersCondition wait for all GameServers for a given fleet to match the spec.replicas and match a a condition
func (*Framework) WaitForGameServerState ¶
func (f *Framework) WaitForGameServerState(gs *v1alpha1.GameServer, state v1alpha1.State, timeout time.Duration) (*v1alpha1.GameServer, error)
WaitForGameServerState Waits untils the gameserver reach a given state before the timeout expires