tests

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JvmLaunchEnvVar = "MAVEN_OPTS"
	GoCacheEnvVar   = "GOMODCACHE"
	PipCacheEnvVar  = "PIP_CACHE_DIR"

	MavenCacheRedirectionVal = "-Dmaven.repo.local="
)
View Source
const (
	XrayEndpoint        = "xray/"
	XscEndpoint         = "xsc/"
	ArtifactoryEndpoint = "artifactory/"
	AccessEndpoint      = "access/"
	RepoDetailsEndpoint = "api/repositories/"

	Out  = "out"
	Temp = "tmp"
)
View Source
const (
	DockerVirtualRepositoryConfig        = "docker_virtual_repository_config.json"
	DockerLocalRepositoryConfig          = "docker_local_repository_config.json"
	DockerRemoteRepositoryConfig         = "docker_remote_repository_config.json"
	NpmRemoteRepositoryConfig            = "npm_remote_repository_config.json"
	NugetRemoteRepositoryConfig          = "nuget_remote_repository_config.json"
	YarnRemoteRepositoryConfig           = "yarn_remote_repository_config.json"
	GradleRemoteRepositoryConfig         = "gradle_remote_repository_config.json"
	MavenRemoteRepositoryConfig          = "maven_remote_repository_config.json"
	MavenRemoteSnapshotsRepositoryConfig = "maven_remote_snapshots_repository_config.json"
	MavenVirtualRepositoryConfig         = "maven_virtual_repository_config.json"
	GoVirtualRepositoryConfig            = "go_virtual_repository_config.json"
	GoRemoteRepositoryConfig             = "go_remote_repository_config.json"
	GoLocalRepositoryConfig              = "go_local_repository_config.json"
	PypiRemoteRepositoryConfig           = "pypi_remote_repository_config.json"

	Repo1RepositoryConfig   = "repo1_repository_config.json"
	VirtualRepositoryConfig = "specs_virtual_repository_config.json"
)

Integration tests - Artifactory repositories creation templates

Variables

View Source
var (
	XrDetails *config.ServerDetails
	XrAuth    auth.ServiceDetails

	XscDetails *config.ServerDetails
	XscAuth    auth.ServiceDetails

	RtDetails     *config.ServerDetails
	RtAuth        auth.ServiceDetails
	RtHttpDetails httputils.HttpClientDetails

	PlatformCli *coreTests.JfrogCli

	TestApplication *components.App
)

Integration tests - global variables

View Source
var (
	TestSecurity   *bool
	TestDockerScan *bool

	JfrogUrl           *string
	JfrogUser          *string
	JfrogPassword      *string
	JfrogSshKeyPath    *string
	JfrogSshPassphrase *string
	JfrogAccessToken   *string

	ContainerRegistry *string

	HideUnitTestLog *bool
	SkipUnitTests   *bool
)

Test flags

View Source
var (
	ServerId = "testServerId"

	// Repositories
	RtRepo1       = "cli-rt1"
	RtVirtualRepo = "cli-rt-virtual"

	DockerVirtualRepo      = "cli-docker-virtual"
	DockerLocalRepo        = "cli-docker-local"
	DockerRemoteRepo       = "cli-docker-remote"
	NpmRemoteRepo          = "cli-npm-remote"
	NugetRemoteRepo        = "cli-nuget-remote"
	YarnRemoteRepo         = "cli-yarn-remote"
	GradleRemoteRepo       = "cli-gradle-remote"
	MvnRemoteRepo          = "cli-mvn-remote"
	MvnRemoteSnapshotsRepo = "cli-mvn-snapshots-remote"
	MvnVirtualRepo         = "cli-mvn-virtual"
	GoVirtualRepo          = "cli-go-virtual"
	GoRemoteRepo           = "cli-go-remote"
	GoRepo                 = "cli-go"
	PypiRemoteRepo         = "cli-pypi-remote"
)

Integration tests - Artifactory information

View Source
var CreatedNonVirtualRepositories map[*string]string
View Source
var CreatedVirtualRepositories map[*string]string

Functions

func AddTimestampToGlobalVars

func AddTimestampToGlobalVars()

func GetAllRepositoriesNames

func GetAllRepositoriesNames() []string

func GetNonVirtualRepositories

func GetNonVirtualRepositories() map[*string]string

Return local and remote repositories for the test suites, respectfully

func GetSubstitutionMap

func GetSubstitutionMap() map[string]string

Builds and repositories names to replace in the test files. We use substitution map to set repositories and builds with timestamp.

func GetVirtualRepositories

func GetVirtualRepositories() map[*string]string

Return virtual repositories for the test suites, respectfully

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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