test

package
v0.0.0-...-d205bd4 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EmptyFeed          = common.Feed{}
	MissingURLMockFeed = common.Feed{"Mock Feed", ""}
	InvalidURLMockFeed = common.Feed{"Mock Feed", "not url"}

	NonRssMockFeed        = common.Feed{"Mock Feed", MockServerUrl + "/"}
	NotFoundURLMockFeed   = common.Feed{"Mock Feed", MockServerUrl + "/feeds/notexist"}
	MissingRssTagFeed     = common.Feed{"Mock Feed", MockServerUrl + "/feeds/missing-rss-tag.xml"}
	MissingChannelTagFeed = common.Feed{"Mock Feed", MockServerUrl + "/feeds/missing-channel-tag.xml"}
	MissingItemTagFeed    = common.Feed{"Mock Feed", MockServerUrl + "/feeds/missing-items.xml"}

	ValidRedisConnection = "host=:6379,database=2"
	MockPort             = "41914"
	MockServerUrl        = "http://localhost:" + MockPort
)

Functions

func AssertFailure

func AssertFailure(t *testing.T, expected string, actual command.Response)

func InitializeRedis

func InitializeRedis(conf config.Config)

create a func to call redis.initializeDB. the func name might be: InitializeRedis

func RunMockHttpServer

func RunMockHttpServer(port string) (*http.Server, *sync.WaitGroup)

func StopMockHttpServer

func StopMockHttpServer(srv *http.Server, httpServerExitDone *sync.WaitGroup)

Types

This section is empty.

Jump to

Keyboard shortcuts

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