test

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: May 29, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package test contains testing utilities for the cost package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertCurrentCost

func AssertCurrentCost(t assert.TestingT, expectedCost cost.Cost, ef cost.Enforcer)

AssertCurrentCost is a helper assertion to check that an enforcer has the given cost.

func AssertLimitError

func AssertLimitError(t assert.TestingT, err error, current, threshold cost.Cost)

AssertLimitError checks that err is a limit error with the given parameters

func AssertLimitErrorWithMsg

func AssertLimitErrorWithMsg(t assert.TestingT, err error, msg string, current, threshold cost.Cost)

AssertLimitErrorWithMsg checks that err is a limit error with the given parameters

Types

This section is empty.

Jump to

Keyboard shortcuts

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