test

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CharSetAlpha = "abcdefghijklmnopqrstuvwxyz"
)

Variables

This section is empty.

Functions

func CheckBoolFieldEqual

func CheckBoolFieldEqual(field string, got bool, want bool) error

func CheckFieldEqual

func CheckFieldEqual(field string, got string, want string) error

func CheckFieldEqualAndSet

func CheckFieldEqualAndSet(field string, got string, want string) error

func CheckFieldSet

func CheckFieldSet(field string, got string) error

func CheckGroup

func CheckGroup(group *buddy.Group, name string, desc string, assignToProjects bool, assignToProjectsPermId int, id int) error

func CheckGroups

func CheckGroups(groups *buddy.Groups, count int) error

func CheckIntFieldEqual

func CheckIntFieldEqual(field string, got int, want int) error

func CheckIntFieldEqualAndSet

func CheckIntFieldEqualAndSet(field string, got int, want int) error

func CheckIntFieldSet

func CheckIntFieldSet(field string, got int) error

func CheckIntegration

func CheckIntegration(integration *buddy.Integration, expected *buddy.Integration, ops *buddy.IntegrationOps) error

func CheckIntegrations

func CheckIntegrations(integrations *buddy.Integrations, count int) error

func CheckMember

func CheckMember(member *buddy.Member, email string, name string, assignToProject bool, assignToProjectPermId int, admin bool, owner bool, id int, status string) error

func CheckMembers

func CheckMembers(members *buddy.Members, count int) error

func CheckPermission

func CheckPermission(permission *buddy.Permission, name string, desc string, id int, pipelineAccessLevel string, repoAccessLevel string, sandboxAccessLevel string, projectTeamAccessLevel string) error

func CheckPermissions

func CheckPermissions(permissions *buddy.Permissions, count int) error

func CheckPipeline added in v1.0.1

func CheckPipeline(project *buddy.Project, pipeline *buddy.Pipeline, expected *buddy.Pipeline, ops *buddy.PipelineOps) error

func CheckPipelineGitConfig added in v1.15.0

func CheckPipelineGitConfig(gitConfig *buddy.PipelineGitConfig, wanted *buddy.PipelineGitConfig) error

func CheckPipelines added in v1.0.1

func CheckPipelines(pipelines *buddy.Pipelines, count int) error

func CheckProfile

func CheckProfile(profile *buddy.Profile, name string) error

func CheckProject

func CheckProject(project *buddy.Project, name string, displayName string, short bool, updateDefaultBranch bool, allowPullRequests bool, fetchSubmodules bool, fetchSubmodulesKey string, access string, withoutRepository bool) error

func CheckProjectGroup

func CheckProjectGroup(projectGroup *buddy.ProjectGroup, group *buddy.Group, permission *buddy.Permission) error

func CheckProjectMember

func CheckProjectMember(projectMember *buddy.ProjectMember, member *buddy.Member, permission *buddy.Permission) error

func CheckProjects

func CheckProjects(projects *buddy.Projects, count int) error

func CheckPublicKey

func CheckPublicKey(key *buddy.PublicKey, title string, content string, id int) error

func CheckSourceContentsDir

func CheckSourceContentsDir(sc *buddy.SourceContents, count int) error

func CheckSourceContentsFile

func CheckSourceContentsFile(sc *buddy.SourceContents, name string, path string) error

func CheckSourceFile

func CheckSourceFile(sf *buddy.SourceFile, name string, path string, message string) error

func CheckSso added in v1.9.0

func CheckSso(sso *buddy.Sso, typ string, ssoUrl string, issuer string, certificate string, signature string, digest string, requireSsoForAllMembers bool) error

func CheckStringArrayEqual added in v1.10.0

func CheckStringArrayEqual(field string, got []string, want []string) error

func CheckToken added in v1.10.0

func CheckToken(token *buddy.Token, name string, expiresIn int, expiresAt string, scopes []string, workspaceRestrictions []string, ipRestrictions []string, id string, hasToken bool) error

func CheckTokens added in v1.10.0

func CheckTokens(tokens *buddy.Tokens, count int) error

func CheckVariable

func CheckVariable(variable *buddy.Variable, key string, val string, typ string, desc string, set bool, enc bool, filePath string, fileChmod string, filePlace string, id int) error

func CheckVariables

func CheckVariables(variables *buddy.Variables, count int) error

func CheckWebhook

func CheckWebhook(webhook *buddy.Webhook, targetUrl string, secretKey string, projectName string, event string, id int) error

func CheckWebhooks

func CheckWebhooks(webhooks *buddy.Webhooks, count int) error

func CheckWorkspace

func CheckWorkspace(workspace *buddy.Workspace, name string, domain string, id int) error

func CheckWorkspaces

func CheckWorkspaces(workspaces *buddy.Workspaces, atLeast int) error

func ErrorFieldEmpty

func ErrorFieldEmpty(field string) error

func ErrorFieldFormatted

func ErrorFieldFormatted(field string, got string, want string) error

func ErrorFieldSet added in v1.15.0

func ErrorFieldSet(field string) error

func ErrorFormatted

func ErrorFormatted(msg string, err error) error

func GenerateCertificate added in v1.9.0

func GenerateCertificate() (error, string)

func GenerateRsaKeyPair added in v1.5.0

func GenerateRsaKeyPair() (error, string, string)

func GetClient

func GetClient() (*buddy.Client, error)

func RandEmail

func RandEmail() string

func RandString

func RandString(strlen int) string

func RandStringFromCharSet

func RandStringFromCharSet(strlen int, charSet string) string

func UniqueString

func UniqueString() string

Types

type Seed

type Seed struct {
	Client         *buddy.Client
	Workspace      *buddy.Workspace
	Project        *buddy.Project
	Group          *buddy.Group
	Member         *buddy.Member
	Permission     *buddy.Permission
	Permission2    *buddy.Permission
	GitIntegration *buddy.Integration
}

func SeedInitialData

func SeedInitialData(ops *SeedOps) (*Seed, error)

type SeedOps

type SeedOps struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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