tests

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TEST_NETWORK_ID        = "N12345"
	TEST_OPERATOR_ID       = "bob"
	WRITE_TEST_NETWORK_ID  = "N6789"
	TEST_SUPER_OPERATOR_ID = "admin"
)

Variables

This section is empty.

Functions

func MockAccessControl

func MockAccessControl(t *testing.T) (certSn string, superCertSn string)

MockAccessControl starts access control related services, creates a supervisor account as well as a test Operator It's intendend to be used by Access Control related unit tests.

func SendRequest

func SendRequest(method, url, certSn string) (int, error)

func StartMockAccessControl

func StartMockAccessControl(t *testing.T, adminId string) string

Starts access control services & adds a test admin operator with requested adminId Returns the Operator's certificate serial number NOTE: StartMockAccessControl is intended to be used by all REST specific unit tests

func WaitForTestServer

func WaitForTestServer(t *testing.T, e *echo.Echo) net.Listener

Types

This section is empty.

Jump to

Keyboard shortcuts

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