testing

package
v0.0.0-...-e653fdf Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: AGPL-3.0 Imports: 27 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMockBuildTools

func GetMockBuildTools(c *gc.C) sync.BuildAgentTarballFunc

GetMockBuildTools returns a sync.BuildAgentTarballFunc implementation which generates a fake tools tarball.

func GetMockBundleTools

func GetMockBundleTools(expectedForceVersion version.Number) tools.BundleToolsFunc

func MakeTools

func MakeTools(c *gc.C, metadataDir, stream string, versionStrings []string) coretools.List

MakeTools creates some fake tools with the given version strings.

func MakeToolsWithCheckSum

func MakeToolsWithCheckSum(c *gc.C, metadataDir, stream string, versionStrings []string) coretools.List

MakeToolsWithCheckSum creates some fake tools (including checksums) with the given version strings.

func ParseMetadataFromDir

func ParseMetadataFromDir(c *gc.C, metadataDir, stream string, expectMirrors bool) []*tools.ToolsMetadata

ParseMetadataFromDir loads ToolsMetadata from the specified directory.

func ParseMetadataFromStorage

func ParseMetadataFromStorage(c *gc.C, stor storage.StorageReader, stream string, expectMirrors bool) []*tools.ToolsMetadata

ParseMetadataFromStorage loads ToolsMetadata from the specified storage reader.

func SHA256sum

func SHA256sum(c *gc.C, path string) (int64, string)

SHA256sum creates the sha256 checksum for the specified file.

func UploadToDirectory

func UploadToDirectory(c *gc.C, dir string, streamVersions StreamVersions) map[string]map[version.Binary]string

UploadToDirectory uploads tools and metadata for the specified versions to dir.

func UploadToStorage

func UploadToStorage(c *gc.C, stor storage.Storage, stream string, versions ...version.Binary) map[version.Binary]string

UploadToStorage uploads tools and metadata for the specified versions to storage.

Types

type StreamVersions

type StreamVersions map[string][]version.Binary

StreamVersions is a map of stream name to binaries in that stream.

Jump to

Keyboard shortcuts

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