integration

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2020 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Package integration contains verification server integration tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

type APIClient struct {
	// contains filtered or unexported fields
}

APIClient is a test client for verification API.

func NewAPIClient

func NewAPIClient(addr, key string) *APIClient

NewAPIClient creates an API server test client.

func (*APIClient) GetCertificate

GetCertificate wraps the VerificationCertificate API call.

func (*APIClient) GetToken

GetToken wraps the VerifyCode API call.

type AdminClient

type AdminClient struct {
	// contains filtered or unexported fields
}

AdminClient is a test client for admin API.

func NewAdminClient

func NewAdminClient(addr, key string) *AdminClient

NewAdminClient creates an Admin API test client.

func (*AdminClient) IssueCode

IssueCode wraps the IssueCode API call.

type Suite

type Suite struct {
	// contains filtered or unexported fields
}

Suite contains the integration test configs and other useful data.

func NewTestSuite

func NewTestSuite(tb testing.TB, ctx context.Context) *Suite

NewTestSuite creates a Suite for integration tests.

func (*Suite) NewAPIServer

func (s *Suite) NewAPIServer(ctx context.Context, tb testing.TB) *APIClient

NewAPIServer runs an API Server and returns a corresponding client.

func (*Suite) NewAdminAPIServer

func (s *Suite) NewAdminAPIServer(ctx context.Context, tb testing.TB) *AdminClient

NewAdminAPIServer runs an Admin API Server and returns a corresponding client.

Jump to

Keyboard shortcuts

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