test

package
v0.33.2 Latest Latest
Warning

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

Go to latest
Published: May 2, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeEvent

func MakeEvent(event *info.Event) *info.Event

MakeEvent should we try to reflect? or json.Marshall? may be better ways, right?

func MakePREvent

func MakePREvent(event *info.Event, comment string) *types.PullRequestEvent

func MakePushEvent added in v0.14.0

func MakePushEvent(event *info.Event, changes []types.PushRequestEventChange) *types.PushRequestEvent

func MuxCommitInfo

func MuxCommitInfo(t *testing.T, mux *http.ServeMux, event *info.Event, commit bbv1.Commit)

func MuxCreateAndTestCommitStatus

func MuxCreateAndTestCommitStatus(t *testing.T, mux *http.ServeMux, event *info.Event, expectedDescSubstr string, expStatus provider.StatusOpts)

func MuxCreateComment

func MuxCreateComment(t *testing.T, mux *http.ServeMux, event *info.Event, expectedCommentSubstr string, prID int)

func MuxDefaultBranch

func MuxDefaultBranch(t *testing.T, mux *http.ServeMux, event *info.Event, defaultBranch, latestCommit string)

func MuxDirContent

func MuxDirContent(t *testing.T, mux *http.ServeMux, event *info.Event, testDir, targetDirName string)

func MuxFiles

func MuxFiles(_ *testing.T, mux *http.ServeMux, event *info.Event, _, targetDirName string, filescontents map[string]string)

func MuxListDir

func MuxListDir(t *testing.T, mux *http.ServeMux, event *info.Event, path string, files []string)

func MuxProjectMemberShip

func MuxProjectMemberShip(t *testing.T, mux *http.ServeMux, event *info.Event, userperms []*bbv1.UserPermission)

func MuxPullRequestActivities

func MuxPullRequestActivities(t *testing.T, mux *http.ServeMux, event *info.Event, prNumber int, activities []*bbv1.Activity)

func MuxRepoMemberShip

func MuxRepoMemberShip(t *testing.T, mux *http.ServeMux, event *info.Event, userperms []*bbv1.UserPermission)

func SetupBBServerClient

func SetupBBServerClient(ctx context.Context) (*bbv1.APIClient, *scm.Client, *http.ServeMux, func(), string)

Types

type DiffPath added in v0.33.0

type DiffPath struct {
	ToString string `json:"toString"`
}

type DiffStat added in v0.33.0

type DiffStat struct {
	Path    DiffPath  `json:"path"`
	SrcPath *DiffPath `json:"srcPath,omitempty"` // used in lib that's why leaving it here nil
	Type    string    `json:"type"`
}

type DiffStats added in v0.33.0

type DiffStats struct {
	Pagination
	Values []*DiffStat
}

type Pagination added in v0.33.0

type Pagination struct {
	Start    int  `json:"start"`
	Size     int  `json:"size"`
	Limit    int  `json:"limit"`
	LastPage bool `json:"isLastPage"`
	NextPage int  `json:"nextPageStart"`
}

Jump to

Keyboard shortcuts

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