Documentation ¶
Index ¶
- Constants
- func AssertContainsBuildTool(t *testing.T, detected []v1alpha1.DetectedBuildType, name, language string, ...)
- func Boolean(value bool) *bool
- func MockGHGetApiCalls(t *testing.T, prjPath, branch string, files, langs SliceOfStrings, ...)
- func MockGHHeadCalls(prjPath, branch string, files SliceOfStrings, modifiers ...GockModifier)
- func MockNotFoundGitHub(repoIdentifier string)
- func NewDummyServiceCreator(flavor string, shouldFail bool, files, langs SliceOfStrings) repository.ServiceCreator
- func NewGitSource(modifiers ...GitSourceModifier) *v1alpha1.GitSource
- func NewGitSourceAnalysis(gitSourceName string) *v1alpha1.GitSourceAnalysis
- func NewReconcileRequest(name string) reconcile.Request
- func NewSecret(secretType corev1.SecretType, data map[string][]byte) *corev1.Secret
- func PrepareClient(gvkObjects ...GvkObject) (client.Client, *runtime.Scheme)
- func PrivateWithPassphrase(t *testing.T, pathToTestDir string) []byte
- func PrivateWithoutPassphrase(t *testing.T, pathToTestDir string) []byte
- func PublicWithPassphrase(t *testing.T, pathToTestDir string) []byte
- func PublicWithoutPassphrase(t *testing.T, pathToTestDir string) []byte
- func RunBasicSshServer(t *testing.T, password string) func()
- func RunKeySshServer(t *testing.T, allowedPublicKey []byte) func()
- func String(value string) *string
- func TurnOffAllGockWhenMatched() gock.Matcher
- type DummyGitRepo
- type DummyService
- func (s *DummyService) CheckBranch() error
- func (s *DummyService) CheckCredentials() error
- func (s *DummyService) CheckRepoAccessibility() error
- func (s *DummyService) Creator() repository.ServiceCreator
- func (s *DummyService) FileExistenceChecker() (repository.FileExistenceChecker, error)
- func (s *DummyService) GetLanguageList() ([]string, error)
- type GitSourceModifier
- type GockModifier
- type GvkObject
- type SliceOfStrings
Constants ¶
View Source
const ( GitSourceName = "some-repo-gs" GitSourceAnalysisName = "some-repo-gsa" Namespace = "my-namespace" )
View Source
const SecretName = "my-secret"
Variables ¶
This section is empty.
Functions ¶
func AssertContainsBuildTool ¶
func MockGHGetApiCalls ¶
func MockGHGetApiCalls(t *testing.T, prjPath, branch string, files, langs SliceOfStrings, modifiers ...GockModifier)
func MockGHHeadCalls ¶
func MockGHHeadCalls(prjPath, branch string, files SliceOfStrings, modifiers ...GockModifier)
func MockNotFoundGitHub ¶
func MockNotFoundGitHub(repoIdentifier string)
func NewDummyServiceCreator ¶
func NewDummyServiceCreator(flavor string, shouldFail bool, files, langs SliceOfStrings) repository.ServiceCreator
func NewGitSource ¶
func NewGitSource(modifiers ...GitSourceModifier) *v1alpha1.GitSource
func NewGitSourceAnalysis ¶
func NewGitSourceAnalysis(gitSourceName string) *v1alpha1.GitSourceAnalysis
func NewReconcileRequest ¶
func PublicWithoutPassphrase ¶
func RunBasicSshServer ¶
func RunKeySshServer ¶
func TurnOffAllGockWhenMatched ¶
func TurnOffAllGockWhenMatched() gock.Matcher
TurnOffAllGockWhenMatched turns off all gock mocks when the matcher is matched
Types ¶
type DummyGitRepo ¶
type DummyGitRepo struct { Path string // contains filtered or unexported fields }
func NewDummyGitRepo ¶
func NewDummyGitRepo(t *testing.T, branchName string) *DummyGitRepo
func (*DummyGitRepo) CheckoutBranch ¶
func (r *DummyGitRepo) CheckoutBranch(branchName string)
func (*DummyGitRepo) Commit ¶
func (r *DummyGitRepo) Commit(fileNames ...string) string
type DummyService ¶
type DummyService struct {
Files, Langs []string
Flavor string
UseFilesChecker bool
// contains filtered or unexported fields
}
func NewDummyService ¶
func NewDummyService(flavor string, shouldFail bool, files, langs SliceOfStrings, useFilesChecker bool) *DummyService
func NewDummyServices ¶
func NewDummyServices(flavor string, shouldFail bool, files, langs SliceOfStrings) []*DummyService
func (*DummyService) CheckBranch ¶
func (s *DummyService) CheckBranch() error
func (*DummyService) CheckCredentials ¶
func (s *DummyService) CheckCredentials() error
func (*DummyService) CheckRepoAccessibility ¶
func (s *DummyService) CheckRepoAccessibility() error
func (*DummyService) Creator ¶
func (s *DummyService) Creator() repository.ServiceCreator
func (*DummyService) FileExistenceChecker ¶
func (s *DummyService) FileExistenceChecker() (repository.FileExistenceChecker, error)
func (*DummyService) GetLanguageList ¶
func (s *DummyService) GetLanguageList() ([]string, error)
type GitSourceModifier ¶
func WithFlavor ¶
func WithFlavor(flavor string) GitSourceModifier
func WithRef ¶
func WithRef(ref string) GitSourceModifier
func WithURL ¶
func WithURL(url string) GitSourceModifier
type GockModifier ¶
type GockModifier func(mock *gock.Request)
type GvkObject ¶
type GvkObject func() (schema.GroupVersion, []runtime.Object)
func RegisterGvkObject ¶
func RegisterGvkObject(gv schema.GroupVersion, types ...runtime.Object) GvkObject
type SliceOfStrings ¶
type SliceOfStrings func() []string
func S ¶
func S(values ...string) SliceOfStrings
Click to show internal directories.
Click to hide internal directories.