testing

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDashboardCell

func AddDashboardCell(
	init func(DashboardFields, *testing.T) (platform.DashboardService, string, func()),
	t *testing.T,
)

AddDashboardCell testing

func CreateDashboard

func CreateDashboard(
	init func(DashboardFields, *testing.T) (platform.DashboardService, string, func()),
	t *testing.T,
)

CreateDashboard testing

func DashboardService

func DashboardService(
	init func(DashboardFields, *testing.T) (platform.DashboardService, string, func()), t *testing.T,
)

DashboardService tests all the service functions.

func DeleteDashboard

func DeleteDashboard(
	init func(DashboardFields, *testing.T) (platform.DashboardService, string, func()),
	t *testing.T,
)

DeleteDashboard testing

func ErrorsEqual

func ErrorsEqual(t *testing.T, actual, expected error)

ErrorsEqual checks to see if the provided errors are equivalent.

func FindDashboardByID

func FindDashboardByID(
	init func(DashboardFields, *testing.T) (platform.DashboardService, string, func()),
	t *testing.T,
)

FindDashboardByID testing

func FindDashboards

func FindDashboards(
	init func(DashboardFields, *testing.T) (platform.DashboardService, string, func()),
	t *testing.T,
)

FindDashboards testing

func FloatPtr

func FloatPtr(f float64) *float64

FloatPtr takes the ref of a float number.

func GetDashboardCellView

func GetDashboardCellView(
	init func(DashboardFields, *testing.T) (platform.DashboardService, string, func()),
	t *testing.T,
)

GetDashboardCellView is the conformance test for the retrieving a dashboard cell.

func MustCreateLabels

func MustCreateLabels(ctx context.Context, svc *kv.Service, labels ...*platform.Label)

func MustCreateMappings

func MustCreateMappings(ctx context.Context, svc *kv.Service, ms ...*platform.UserResourceMapping)

func MustCreateOrgs

func MustCreateOrgs(ctx context.Context, svc *kv.Service, os ...*platform.Organization)

func MustCreateUsers

func MustCreateUsers(ctx context.Context, svc *kv.Service, us ...*platform.User)

func MustIDBase16

func MustIDBase16(s string) platform.ID

MustIDBase16 is an helper to ensure a correct ID is built during testing.

func MustIDBase16Ptr

func MustIDBase16Ptr(s string) *platform.ID

MustIDBase16Ptr is an helper to ensure a correct ID ptr ref is built during testing.

func MustMakeUsersOrgMember

func MustMakeUsersOrgMember(ctx context.Context, svc *kv.Service, oid platform.ID, uids ...platform.ID)

func MustMakeUsersOrgOwner

func MustMakeUsersOrgOwner(ctx context.Context, svc *kv.Service, oid platform.ID, uids ...platform.ID)

func MustNewPermissionAtID

func MustNewPermissionAtID(id platform.ID, a platform.Action, rt platform.ResourceType, orgID platform.ID) *platform.Permission

func RemoveDashboardCell

func RemoveDashboardCell(
	init func(DashboardFields, *testing.T) (platform.DashboardService, string, func()),
	t *testing.T,
)

RemoveDashboardCell testing

func ReplaceDashboardCells

func ReplaceDashboardCells(
	init func(DashboardFields, *testing.T) (platform.DashboardService, string, func()),
	t *testing.T,
)

ReplaceDashboardCells testing

func UpdateDashboard

func UpdateDashboard(
	init func(DashboardFields, *testing.T) (platform.DashboardService, string, func()),
	t *testing.T,
)

UpdateDashboard testing

func UpdateDashboardCell

func UpdateDashboardCell(
	init func(DashboardFields, *testing.T) (platform.DashboardService, string, func()),
	t *testing.T,
)

UpdateDashboardCell testing

func UpdateDashboardCellView

func UpdateDashboardCellView(
	init func(DashboardFields, *testing.T) (platform.DashboardService, string, func()),
	t *testing.T,
)

UpdateDashboardCellView is the conformance test for the updating a dashboard cell.

Types

type DashboardFields

type DashboardFields struct {
	IDGenerator   platform.IDGenerator
	TimeGenerator platform.TimeGenerator
	Dashboards    []*platform.Dashboard
	Views         []*platform.View
}

DashboardFields will include the IDGenerator, and dashboards

Jump to

Keyboard shortcuts

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