internal

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2021 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(w io.Writer, filename string) error

func NewTestApp

func NewTestApp(t *testing.T, name string, cmd *cli.Command) *cli.App

func Root

func Root() (string, error)

Root finds the root of the source tree by recursively ascending until 'go.mod' is located

func Run

func Run(t *testing.T, tt *Harness, mux *http.ServeMux, cmd func(*testing.T, string) *cli.Command)

func TdF

func TdF(t *testing.T) string

func TestMain

func TestMain(m *testing.M)

Types

type ActivityTestSuite

type ActivityTestSuite struct {
	suite.Suite
	Name          string
	Encodings     []string
	MaxActivities int64
	Routes        bool
	Upload        bool
	StreamSets    bool
}

ActivityTestSuite for testing activity services

func (*ActivityTestSuite) N

func (s *ActivityTestSuite) N() int64

func (*ActivityTestSuite) TestActivity

func (s *ActivityTestSuite) TestActivity()

func (*ActivityTestSuite) TestAthlete

func (s *ActivityTestSuite) TestAthlete()

func (*ActivityTestSuite) TestRoutes

func (s *ActivityTestSuite) TestRoutes()

func (*ActivityTestSuite) TestStreamSets

func (s *ActivityTestSuite) TestStreamSets()

func (*ActivityTestSuite) TestUpload

func (s *ActivityTestSuite) TestUpload()

TestUploads confirms collecting files and initiating a dryrun upload works but doesn't

actually upload (if dryrun is working correctly!)

type GravlCmd

type GravlCmd struct {
	*cmd.Cmd
}

GravlCmd executes `gravl` commands

func Gravl

func Gravl(args ...string) *GravlCmd

Gravl creates a new instance of `Gravl`

func (*GravlCmd) Stderr

func (c *GravlCmd) Stderr() string

Stderr returns all the contents of stderr

func (*GravlCmd) Stdout

func (c *GravlCmd) Stdout() string

Stdout returns all the contents of stdout

func (*GravlCmd) Success

func (c *GravlCmd) Success() bool

Success returns `true` if the `gravl` exit status is 0

type Harness

type Harness struct {
	Name, Err     string
	Args          []string
	Counters      map[string]int
	Before, After func(app *cli.App)
}

Jump to

Keyboard shortcuts

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