cmdtest

package
v1.40.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ProjectPath       string
	GlabBinaryPath    string
	CachedTestFactory *cmdutils.Factory
)

Functions

func CopyTestRepo

func CopyTestRepo(log fatalLogger, name string) string

func Eq

func Eq(t *testing.T, got interface{}, expected interface{})

func ExecuteCommand added in v1.25.0

func ExecuteCommand(cmd *cobra.Command, cli string, stdout *bytes.Buffer, stderr *bytes.Buffer) (*test.CmdOut, error)

func FirstLine

func FirstLine(output []byte) string

func InitFactory added in v1.25.0

func InitFactory(ios *iostreams.IOStreams, rt http.RoundTripper) *cmdutils.Factory

func InitIOStreams added in v1.25.0

func InitIOStreams(isTTY bool, doHyperlinks string) (*iostreams.IOStreams, *bytes.Buffer, *bytes.Buffer, *bytes.Buffer)

func InitTest

func InitTest(m *testing.M, suffix string)

func RunCommand

func RunCommand(cmd *cobra.Command, cli string, stds ...*bytes.Buffer) (*test.CmdOut, error)

func StubFactory

func StubFactory(repo string) *cmdutils.Factory

func StubFactoryWithConfig

func StubFactoryWithConfig(repo string) (*cmdutils.Factory, error)

Types

type Author

type Author struct {
	ID        int    `json:"id"`
	Username  string `json:"username"`
	Email     string `json:"email"`
	Name      string `json:"name"`
	State     string `json:"state"`
	AvatarURL string `json:"avatar_url"`
	WebURL    string `json:"web_url"`
}

Jump to

Keyboard shortcuts

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