Help us shape the future of Go! Take the 2026 Go Developer Survey

gitea

package
v0.19.6 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckIfPipelineRunsCancelled added in v0.15.0

func CheckIfPipelineRunsCancelled(t *testing.T, topts *TestOpts)

func CreateAccess

func CreateAccess(topts *TestOpts, touser, accessMode string) error

func CreateCRD

func CreateCRD(ctx context.Context, topts *TestOpts) error

func CreateForkPullRequest

func CreateForkPullRequest(t *testing.T, topts *TestOpts, secondcnx pgitea.Provider,
	accessMode, command string,
) *gitea.PullRequest

func CreateGiteaRepo

func CreateGiteaRepo(giteaClient *gitea.Client, user, name, hookURL string) (*gitea.Repository, error)

func CreateGiteaUser

func CreateGiteaUser(giteaClient *gitea.Client, apiURL, username, password string) (pgitea.Provider, error)

func CreateProvider

func CreateProvider(ctx context.Context, giteaURL, user, password string) (gitea.Provider, error)

func InitGitRepo

func InitGitRepo(t *testing.T) (string, func())

func MakeGitCloneURL

func MakeGitCloneURL(targetURL, giteaUsername, giteaPassword string) (string, error)

Make a clone url with username and password

func MakeRequest

func MakeRequest(ctx context.Context, httpClient http.Client, url, username, password string) (*http.Response, error)

func PostCommentOnPullRequest

func PostCommentOnPullRequest(t *testing.T, topt *TestOpts, body string)

func PushFilesToRefAPI

func PushFilesToRefAPI(t *testing.T, topts *TestOpts, entries map[string]string) (string, error)

PushFilesToRefAPI will push files to a given ref via API

func PushFilesToRefGit

func PushFilesToRefGit(t *testing.T, topts *TestOpts, entries map[string]string, baseRefFrom string)

func Setup

func TearDown

func TearDown(ctx context.Context, t *testing.T, topts *TestOpts)

func TestPR

func TestPR(t *testing.T, topts *TestOpts) func()

TestPR will test the pull request event and grab comments from the PR

func WaitForPullRequestCommentMatch

func WaitForPullRequestCommentMatch(t *testing.T, topts *TestOpts)

func WaitForSecretDeletion added in v0.14.3

func WaitForSecretDeletion(t *testing.T, topts *TestOpts, _ string)

func WaitForStatus

func WaitForStatus(t *testing.T, topts *TestOpts, ref string)

Types

type TestOpts

type TestOpts struct {
	NoPullRequestCreation bool
	SkipEventsCheck       bool
	NoCleanup             bool
	TargetNS              string
	TargetEvent           string
	Settings              *v1alpha1.Settings
	Regexp                *regexp.Regexp
	YAMLFiles             map[string]string
	ExtraArgs             map[string]string
	RepoCRParams          *[]v1alpha1.Params
	CheckForStatus        string
	TargetRefName         string
	CheckForNumberStatus  int
	ConcurrencyLimit      *int
	ParamsRun             *params.Run
	GiteaCNX              pgitea.Provider
	Opts                  options.E2E
	PullRequest           *gitea.PullRequest
	DefaultBranch         string
	GitCloneURL           string
	GitHTMLURL            string
	GiteaAPIURL           string
	GiteaPassword         string
	ExpectEvents          bool
	InternalGiteaURL      string
}

type Timelines

type Timelines []struct {
	Body string `json:"body"`
}

func GetIssueTimeline

func GetIssueTimeline(ctx context.Context, topts *TestOpts) (Timelines, error)

Jump to

Keyboard shortcuts

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