Documentation ¶
Overview ¶
Package config provides testing helpers for Traffic Ops API tests.
Index ¶
Constants ¶
const ( BadAssignmentMatch = iota + 1 NotEnoughAssignments ExcessLabel InvalidLabel MissingLabel InvalidAction InvalidBool InvalidCacheCookieResponse InvalidHTTPScheme InvalidHost InvalidIP UnknownMethod InvalidIPRange InvalidPort InvalidRegex InvalidTimeFormatDHMS InvalidTimeRange24Hr )
Error codes:
Variables ¶
var ErrorContext *test.ErrorContext
ErrorContext contains the error codes mentioned above. Any error made must have one of those error codes.
Functions ¶
func Validate24HrTimeRange ¶
Validate24HrTimeRange determines whether the provided string fits in a format such as "08:00-16:00".
func ValidateDHMSTimeFormat ¶
ValidateDHMSTimeFormat determines whether the provided string fits in a format such as "1d8h", where the valid units are days, hours, minutes, and seconds.
func ValidateIPRange ¶
ValidateIPRange validates one of the following forms: 1) IP (supports shorthand of IPv4 and IPv6 addresses) 2) IP/n (CIDR) 3) IP1-IP2 where IP1 < IP2 and type(IP1) == type(IP2)
Types ¶
type NegativeTest ¶
NegativeTest is a struct for table tests.
type PositiveTest ¶
PositiveTest is a struct for table tests.