test

package
v0.0.0-...-6b15219 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package test is a package that is used to run a boardgame/server.StorageManager implementation through its paces and verify it does everything correctly.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AgentsTest

func AgentsTest(factory StorageManagerFactory, testName string, connectConfig string, t *testing.T)

AgentsTest does the basic tests of Agents.

func BasicTest

func BasicTest(factory StorageManagerFactory, testName string, connectConfig string, t *testing.T)

BasicTest does the basic tests

func ListingTest

func ListingTest(factory StorageManagerFactory, testName string, connectConfig string, t *testing.T)

ListingTest does the basic tests of Listing.

func Test

func Test(factory StorageManagerFactory, testName string, connectConfig string, t *testing.T)

Test is the primary entrypoint for this package, running BasicTest, UsersTest, AgentsTest, and ListingTest.

func UsersTest

func UsersTest(factory StorageManagerFactory, testName string, connectConfig string, t *testing.T)

UsersTest does the basic tests of Users

Types

type StorageManager

type StorageManager interface {
	api.StorageManager

	//CleanUp will be called when a given manager is done and can be dispoed of.
	CleanUp()
}

StorageManager is the interface for everything that needs to be connected. It's just api.StorageManager with one more method.

type StorageManagerFactory

type StorageManagerFactory func() StorageManager

StorageManagerFactory vends a new StorageManager to test. Users of this package provide one.

Jump to

Keyboard shortcuts

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