tests

package
v2.57.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigTestServer

func ConfigTestServer(t *testing.T) (cleanUp func(), err error)

func CreateAccessRestsMockServer added in v2.41.0

func CreateAccessRestsMockServer(t *testing.T, testHandler restsTestHandler) (*httptest.Server, *config.ServerDetails, *access.AccessServicesManager)

func CreateDsRestsMockServer added in v2.24.0

func CreateDsRestsMockServer(t *testing.T, testHandler restsTestHandler) (*httptest.Server, *config.ServerDetails, *distribution.DistributionServicesManager)

func CreateRestsMockServer added in v2.19.0

func CreateRestsMockServer(testHandler restsTestHandler) *httptest.Server

Create mock server to test REST APIs. testHandler - The HTTP handler of the test

func CreateRtRestsMockServer added in v2.24.0

func CreateRtRestsMockServer(t *testing.T, testHandler restsTestHandler) (*httptest.Server, *config.ServerDetails, artifactory.ArtifactoryServicesManager)

func CreateTestServerDetails

func CreateTestServerDetails() *config.ServerDetails

func DeleteTestContainer added in v2.47.11

func DeleteTestContainer(t *testing.T, containerName string, containerManagerType container.ContainerManagerType)

func DeleteTestImage added in v2.47.11

func DeleteTestImage(t *testing.T, imageTag string, containerManagerType container.ContainerManagerType)

func MockProgressInitialization added in v2.47.11

func MockProgressInitialization() func()

Set progressbar.ShouldInitProgressBar func to always return true so the progress bar library will be initialized and progress will be displayed. The returned callback sets the original func back.

func ReplaceTemplateVariables added in v2.47.11

func ReplaceTemplateVariables(path, destPath string, subMap map[string]string) (string, error)

Replace all variables in the form of ${VARIABLE} in the input file, according to the substitution map. path - Path to the input file. destPath - Path to the output file. If empty, the output file will be under ${CWD}/tmp/.

Types

type BuildDockerImage added in v2.47.11

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

Image get parent image id command

func NewBuildDockerImage added in v2.47.11

func NewBuildDockerImage(imageTag, dockerFilePath string, containerManager container.ContainerManagerType) *BuildDockerImage

func (*BuildDockerImage) GetCmd added in v2.47.11

func (image *BuildDockerImage) GetCmd() *exec.Cmd

func (*BuildDockerImage) GetEnv added in v2.47.11

func (image *BuildDockerImage) GetEnv() map[string]string

func (*BuildDockerImage) GetErrWriter added in v2.47.11

func (image *BuildDockerImage) GetErrWriter() io.WriteCloser

func (*BuildDockerImage) GetStdWriter added in v2.47.11

func (image *BuildDockerImage) GetStdWriter() io.WriteCloser

func (*BuildDockerImage) SetDockerFileName added in v2.47.11

func (image *BuildDockerImage) SetDockerFileName(name string) *BuildDockerImage

type DeleteContainer added in v2.47.11

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

func NewDeleteContainer added in v2.47.11

func NewDeleteContainer(containerName string, containerManager container.ContainerManagerType) *DeleteContainer

func (*DeleteContainer) GetCmd added in v2.47.11

func (image *DeleteContainer) GetCmd() *exec.Cmd

func (*DeleteContainer) GetEnv added in v2.47.11

func (image *DeleteContainer) GetEnv() map[string]string

func (*DeleteContainer) GetErrWriter added in v2.47.11

func (image *DeleteContainer) GetErrWriter() io.WriteCloser

func (*DeleteContainer) GetStdWriter added in v2.47.11

func (image *DeleteContainer) GetStdWriter() io.WriteCloser

type DeleteDockerImage added in v2.47.11

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

func NewDeleteDockerImage added in v2.47.11

func NewDeleteDockerImage(imageTag string, containerManager container.ContainerManagerType) *DeleteDockerImage

func (*DeleteDockerImage) GetCmd added in v2.47.11

func (image *DeleteDockerImage) GetCmd() *exec.Cmd

func (*DeleteDockerImage) GetEnv added in v2.47.11

func (image *DeleteDockerImage) GetEnv() map[string]string

func (*DeleteDockerImage) GetErrWriter added in v2.47.11

func (image *DeleteDockerImage) GetErrWriter() io.WriteCloser

func (*DeleteDockerImage) GetStdWriter added in v2.47.11

func (image *DeleteDockerImage) GetStdWriter() io.WriteCloser

type ExecDockerImage added in v2.47.11

type ExecDockerImage struct {
	Args []string
	// contains filtered or unexported fields
}

The ExecDockerImage command runs a new command in a running container.

func NewExecDockerImage added in v2.47.11

func NewExecDockerImage(containerManager container.ContainerManagerType, args ...string) *ExecDockerImage

func (*ExecDockerImage) GetCmd added in v2.47.11

func (e *ExecDockerImage) GetCmd() *exec.Cmd

func (*ExecDockerImage) GetEnv added in v2.47.11

func (e *ExecDockerImage) GetEnv() map[string]string

func (*ExecDockerImage) GetErrWriter added in v2.47.11

func (e *ExecDockerImage) GetErrWriter() io.WriteCloser

func (*ExecDockerImage) GetStdWriter added in v2.47.11

func (e *ExecDockerImage) GetStdWriter() io.WriteCloser

func (*ExecDockerImage) SetErrWriter added in v2.47.11

func (e *ExecDockerImage) SetErrWriter(writer io.WriteCloser)

func (*ExecDockerImage) SetStdWriter added in v2.47.11

func (e *ExecDockerImage) SetStdWriter(writer io.WriteCloser)

type RunDockerImage added in v2.47.11

type RunDockerImage struct {
	Args []string
	// contains filtered or unexported fields
}

func NewRunDockerImage added in v2.47.11

func NewRunDockerImage(containerManager container.ContainerManagerType, args ...string) *RunDockerImage

func (*RunDockerImage) GetCmd added in v2.47.11

func (run *RunDockerImage) GetCmd() *exec.Cmd

func (*RunDockerImage) GetEnv added in v2.47.11

func (run *RunDockerImage) GetEnv() map[string]string

func (*RunDockerImage) GetErrWriter added in v2.47.11

func (run *RunDockerImage) GetErrWriter() io.WriteCloser

func (*RunDockerImage) GetStdWriter added in v2.47.11

func (run *RunDockerImage) GetStdWriter() io.WriteCloser

Jump to

Keyboard shortcuts

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