testing

package
v2.7.7 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: MIT Imports: 11 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 influxdb.LabelService, labels ...*influxdb.Label)

func MustCreateMappings

func MustCreateMappings(ctx context.Context, svc influxdb.UserResourceMappingService, ms ...*influxdb.UserResourceMapping)

func MustCreateOrgs

func MustCreateOrgs(ctx context.Context, svc influxdb.OrganizationService, os ...*influxdb.Organization)

func MustCreateUsers

func MustCreateUsers(ctx context.Context, svc influxdb.UserService, us ...*influxdb.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 influxdb.UserResourceMappingService, oid platform.ID, uids ...platform.ID)

func MustMakeUsersOrgOwner

func MustMakeUsersOrgOwner(ctx context.Context, svc influxdb.UserResourceMappingService, oid platform.ID, uids ...platform.ID)

func MustNewPermissionAtID

func MustNewPermissionAtID(id platform.ID, a influxdb.Action, rt influxdb.ResourceType, orgID platform.ID) *influxdb.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   platform2.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