testutil

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package testutil wraps basic tools when building goalng test cases.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert

func Assert(tb TB, condition bool, fmt string, a ...interface{})

func Equals

func Equals(tb TB, exp, act interface{})

func NewHTTPServer

func NewHTTPServer(t *testing.T, opt *HTTPServerOptions)

func NotOk

func NotOk(tb TB, err error, fmt string, a ...interface{})

func Ok

func Ok(tb TB, err error)

Types

type HTTPServerOptions

type HTTPServerOptions struct {
	Bind string
	Exit chan interface{}

	SSL     bool
	CrtFile string
	KeyFile string

	Routes map[string]func(*gin.Context)
}

type TB

type TB interface {
	Helper()
	Fatalf(string, ...interface{})
}

Jump to

Keyboard shortcuts

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