shoutrrr: Index | Files

package testutils

import ""


Package Files

config.go eavesdropper.go failwriter.go iofaker.go textconfaker.go

func CreateFailWriter Uses

func CreateFailWriter(writeLimit int) io.WriteCloser

CreateFailWriter returns a io.WriteCloser that returns an error after the amount of writes indicated by writeLimit

func TestConfigGetEnumsCount Uses

func TestConfigGetEnumsCount(config types.ServiceConfig, expectedCount int)

TestConfigGetEnumsCount tests whether the config.Enums returns the expected amount of items

func TestConfigGetFieldsCount Uses

func TestConfigGetFieldsCount(config types.ServiceConfig, expectedCount int)

TestConfigGetFieldsCount tests whether the config.QueryFields return the expected amount of fields

func TestConfigGetInvalidQueryValue Uses

func TestConfigGetInvalidQueryValue(config types.ServiceConfig)

TestConfigGetInvalidQueryValue tests whether the config returns an error when an invalid query value is requested

func TestConfigSetInvalidQueryValue Uses

func TestConfigSetInvalidQueryValue(config types.ServiceConfig, rawInvalidURL string)

TestConfigSetInvalidQueryValue tests whether the config returns an error when a URL with an invalid query value is parsed

type Eavesdropper Uses

type Eavesdropper interface {
    GetConversation(includeGreeting bool) string

Eavesdropper is an interface that provides a way to get a summarized output of a connection RX and TX

func CreateTextConFaker Uses

func CreateTextConFaker(responses []string, delim string) (*textproto.Conn, Eavesdropper)

CreateTextConFaker returns a textproto.Conn to fake textproto based connections

Package testutils imports 9 packages (graph). Updated 2019-08-02. Refresh now. Tools for package owners.