fake

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const NotFoundMessage = "not found"

NotFoundMessage error message if something is not found

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildRequest

type BuildRequest struct {
	Job    gojenkins.Job
	Values url.Values
}

BuildRequest for recording build requests

type Client

type Client struct {
	Jobs          []gojenkins.Job
	BaseURLValue  string
	Operations    []string
	XMLJobs       []XMLJob
	FolderXMLJobs []FolderXMLJob
	BuildRequests []BuildRequest
	// contains filtered or unexported fields
}

FakeClient a fake Jenkins client for easier testing

func (*Client) AddJobToView

func (f *Client) AddJobToView(string, gojenkins.Job) error

func (*Client) BaseURL

func (f *Client) BaseURL() string

func (*Client) Build

func (f *Client) Build(job gojenkins.Job, values url.Values) error

func (*Client) CreateCredential

func (f *Client) CreateCredential(string, string, string) error

func (*Client) CreateFolderJobWithXML

func (f *Client) CreateFolderJobWithXML(jobItemXml string, folder string, jobName string) error

func (*Client) CreateJob

func (f *Client) CreateJob(gojenkins.JobItem, string) error

func (*Client) CreateJobWithXML

func (f *Client) CreateJobWithXML(jobItemXml string, jobName string) error

func (*Client) CreateView

func (f *Client) CreateView(gojenkins.ListView) error

func (*Client) DeleteJob

func (f *Client) DeleteJob(gojenkins.Job) error

func (*Client) GetArtifact

func (f *Client) GetArtifact(gojenkins.Build, gojenkins.Artifact) ([]byte, error)

func (*Client) GetBuild

func (f *Client) GetBuild(gojenkins.Job, int) (gojenkins.Build, error)

func (*Client) GetBuildConsoleOutput

func (f *Client) GetBuildConsoleOutput(gojenkins.Build) ([]byte, error)

func (*Client) GetBuildURL

func (f *Client) GetBuildURL(gojenkins.Job, int) string

func (*Client) GetComputer

func (f *Client) GetComputer(string) (gojenkins.Computer, error)

func (*Client) GetComputerObject

func (f *Client) GetComputerObject() (gojenkins.ComputerObject, error)

func (*Client) GetComputers

func (f *Client) GetComputers() ([]gojenkins.Computer, error)

func (*Client) GetCredential

func (f *Client) GetCredential(string) (*gojenkins.Credentials, error)

func (*Client) GetJob

func (f *Client) GetJob(name string) (gojenkins.Job, error)

func (*Client) GetJobByPath

func (f *Client) GetJobByPath(paths ...string) (gojenkins.Job, error)

func (*Client) GetJobConfig

func (f *Client) GetJobConfig(string) (gojenkins.JobItem, error)

func (*Client) GetJobURLPath

func (f *Client) GetJobURLPath(path string) string

func (*Client) GetJobs

func (f *Client) GetJobs() ([]gojenkins.Job, error)

func (*Client) GetLastBuild

func (f *Client) GetLastBuild(gojenkins.Job) (gojenkins.Build, error)

func (*Client) GetLogFromURL

func (f *Client) GetLogFromURL(string, int64, *gojenkins.LogData) error

func (*Client) GetMultiBranchJob

func (f *Client) GetMultiBranchJob(string, string, string) (gojenkins.Job, error)

func (*Client) GetOrganizationScanResult

func (f *Client) GetOrganizationScanResult(int, gojenkins.Job) (string, error)

func (*Client) GetQueue

func (f *Client) GetQueue() (gojenkins.Queue, error)

func (*Client) IsErrNotFound

func (f *Client) IsErrNotFound(err error) bool

func (*Client) NewLogPoller

func (f *Client) NewLogPoller(string, io.Writer) *gojenkins.LogPoller

func (*Client) Post

func (f *Client) Post(string, url.Values, interface{}) (err error)

func (*Client) QuietDown

func (f *Client) QuietDown() error

func (*Client) Reload

func (f *Client) Reload() error

func (*Client) RemoveJob

func (f *Client) RemoveJob(string) error

func (*Client) Restart

func (f *Client) Restart() error

func (*Client) SafeRestart

func (f *Client) SafeRestart() error

func (*Client) SetBuildDescription

func (f *Client) SetBuildDescription(gojenkins.Build, string) error

func (*Client) SetHTTPClient

func (f *Client) SetHTTPClient(httpClient *http.Client)

func (*Client) StopBuild

func (f *Client) StopBuild(gojenkins.Job, int) error

func (*Client) TailLog

func (*Client) TailLogFunc

func (f *Client) TailLogFunc(string, io.Writer) gojenkins.ConditionFunc

func (*Client) UpdateJob

func (f *Client) UpdateJob(gojenkins.JobItem, string) error

type FolderXMLJob

type FolderXMLJob struct {
	JobItemXml string
	Folder     string
	JobName    string
}

FolderXMLJob represents a fake created folder XML Job

func (*FolderXMLJob) FullJobPath

func (j *FolderXMLJob) FullJobPath() string

FullJobPath returns the full job path

type XMLJob

type XMLJob struct {
	JobItemXml string
	JobName    string
}

XMLJob represents a fake created XML Job

Jump to

Keyboard shortcuts

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