juju: github.com/juju/juju/environs/tools/testing Index | Files

package testing

import "github.com/juju/juju/environs/tools/testing"

Index

Package Files

testing.go

func GetMockBuildTools Uses

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

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

func GetMockBundleTools Uses

func GetMockBundleTools(c *gc.C, expectedForceVersion *version.Number) tools.BundleToolsFunc

func MakeTools Uses

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

MakeTools creates some fake tools with the given version strings.

func MakeToolsWithCheckSum Uses

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 Uses

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

ParseMetadataFromDir loads ToolsMetadata from the specified directory.

func ParseMetadataFromStorage Uses

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

ParseMetadataFromStorage loads ToolsMetadata from the specified storage reader.

func SHA256sum Uses

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

SHA256sum creates the sha256 checksum for the specified file.

func UploadToDirectory Uses

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 Uses

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.

type StreamVersions Uses

type StreamVersions map[string][]version.Binary

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

Package testing imports 29 packages (graph) and is imported by 38 packages. Updated 2018-06-29. Refresh now. Tools for package owners.