framework

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package framework is a package helping setting up end-to-end testing accross a Kubernetes cluster.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PingGameServer

func PingGameServer(msg, address string) (reply string, err error)

PingGameServer pings a gameserver and returns its reply

Types

type Framework

type Framework struct {
	KubeClient      kubernetes.Interface
	AgonesClient    versioned.Interface
	GameServerImage string
}

Framework is a testing framework

func New

func New(kubeconfig, gsimage string) (*Framework, error)

New setups a testing framework using a kubeconfig path and the game server image to use for testing.

func (*Framework) CleanUp

func (f *Framework) CleanUp(ns string) error

CleanUp Delete all agones resources in a given namespace

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) 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

Jump to

Keyboard shortcuts

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