Documentation ¶
Index ¶
- Constants
- Variables
- func AddSignedFiles(c *gc.C, files map[string]string) map[string]string
- func AssertExpectedSources(c *gc.C, obtained []simplestreams.DataSource, dsDetails []SourceDetails)
- func InvalidDataSource(requireSigned bool) simplestreams.DataSource
- func NewTestConstraint(params simplestreams.LookupParams) *testConstraint
- func SetRoundTripperFiles(files map[string]string, errorFiles map[string]int)
- func SignMetadata(fileName string, fileData []byte) (string, []byte, error)
- func VerifyDefaultCloudDataSource(description, baseURL string) simplestreams.DataSource
- type LocalLiveSimplestreamsSuite
- func (s *LocalLiveSimplestreamsSuite) AssertGetItemCollections(c *gc.C, version string) *simplestreams.ItemCollection
- func (s *LocalLiveSimplestreamsSuite) AssertGetMetadata(c *gc.C) *simplestreams.CloudMetadata
- func (s *LocalLiveSimplestreamsSuite) GetIndexRef(format string) (*simplestreams.IndexReference, error)
- func (s *LocalLiveSimplestreamsSuite) IndexPath() string
- func (s *LocalLiveSimplestreamsSuite) SetUpSuite(c *gc.C)
- func (s *LocalLiveSimplestreamsSuite) TearDownSuite(c *gc.C)
- func (s *LocalLiveSimplestreamsSuite) TestGetCloudMetadataWithFormat(c *gc.C)
- func (s *LocalLiveSimplestreamsSuite) TestGetIndex(c *gc.C)
- func (s *LocalLiveSimplestreamsSuite) TestGetIndexWrongFormat(c *gc.C)
- func (s *LocalLiveSimplestreamsSuite) TestGetProductsPathExists(c *gc.C)
- func (s *LocalLiveSimplestreamsSuite) TestGetProductsPathInvalidCloudSpec(c *gc.C)
- func (s *LocalLiveSimplestreamsSuite) TestGetProductsPathInvalidProductSpec(c *gc.C)
- type SourceDetails
- type StubDataSource
- func (s *StubDataSource) Description() string
- func (s *StubDataSource) Fetch(path string) (io.ReadCloser, string, error)
- func (s *StubDataSource) Priority() int
- func (s *StubDataSource) PublicSigningKey() string
- func (s *StubDataSource) RequireSigned() bool
- func (s *StubDataSource) SetAllowRetry(allow bool)
- func (s *StubDataSource) URL(path string) (string, error)
- type TestDataSuite
- type TestItem
Constants ¶
View Source
const ( UnsignedJsonSuffix = ".json" SignedJsonSuffix = ".sjson" )
View Source
const ( Index_v1 = "index:1.0" Product_v1 = "products:1.0" )
Variables ¶
View Source
var PrivateKeyPassphrase = "12345"
View Source
var SignedMetadataPrivateKey = `` /* 1109-byte string literal not displayed */
View Source
var SignedMetadataPublicKey = `` /* 606-byte string literal not displayed */
View Source
var TestRoundTripper = &testing.ProxyRoundTripper{}
Functions ¶
func AssertExpectedSources ¶
func AssertExpectedSources(c *gc.C, obtained []simplestreams.DataSource, dsDetails []SourceDetails)
func InvalidDataSource ¶
func InvalidDataSource(requireSigned bool) simplestreams.DataSource
func NewTestConstraint ¶
func NewTestConstraint(params simplestreams.LookupParams) *testConstraint
func SetRoundTripperFiles ¶
func VerifyDefaultCloudDataSource ¶
func VerifyDefaultCloudDataSource(description, baseURL string) simplestreams.DataSource
Types ¶
type LocalLiveSimplestreamsSuite ¶
type LocalLiveSimplestreamsSuite struct { testing.BaseSuite Source simplestreams.DataSource RequireSigned bool StreamsVersion string DataType string ValidConstraint simplestreams.LookupConstraint }
func (*LocalLiveSimplestreamsSuite) AssertGetItemCollections ¶
func (s *LocalLiveSimplestreamsSuite) AssertGetItemCollections(c *gc.C, version string) *simplestreams.ItemCollection
func (*LocalLiveSimplestreamsSuite) AssertGetMetadata ¶
func (s *LocalLiveSimplestreamsSuite) AssertGetMetadata(c *gc.C) *simplestreams.CloudMetadata
func (*LocalLiveSimplestreamsSuite) GetIndexRef ¶
func (s *LocalLiveSimplestreamsSuite) GetIndexRef(format string) (*simplestreams.IndexReference, error)
func (*LocalLiveSimplestreamsSuite) IndexPath ¶
func (s *LocalLiveSimplestreamsSuite) IndexPath() string
func (*LocalLiveSimplestreamsSuite) SetUpSuite ¶
func (s *LocalLiveSimplestreamsSuite) SetUpSuite(c *gc.C)
func (*LocalLiveSimplestreamsSuite) TearDownSuite ¶
func (s *LocalLiveSimplestreamsSuite) TearDownSuite(c *gc.C)
func (*LocalLiveSimplestreamsSuite) TestGetCloudMetadataWithFormat ¶
func (s *LocalLiveSimplestreamsSuite) TestGetCloudMetadataWithFormat(c *gc.C)
func (*LocalLiveSimplestreamsSuite) TestGetIndex ¶
func (s *LocalLiveSimplestreamsSuite) TestGetIndex(c *gc.C)
func (*LocalLiveSimplestreamsSuite) TestGetIndexWrongFormat ¶
func (s *LocalLiveSimplestreamsSuite) TestGetIndexWrongFormat(c *gc.C)
func (*LocalLiveSimplestreamsSuite) TestGetProductsPathExists ¶
func (s *LocalLiveSimplestreamsSuite) TestGetProductsPathExists(c *gc.C)
func (*LocalLiveSimplestreamsSuite) TestGetProductsPathInvalidCloudSpec ¶
func (s *LocalLiveSimplestreamsSuite) TestGetProductsPathInvalidCloudSpec(c *gc.C)
func (*LocalLiveSimplestreamsSuite) TestGetProductsPathInvalidProductSpec ¶
func (s *LocalLiveSimplestreamsSuite) TestGetProductsPathInvalidProductSpec(c *gc.C)
type SourceDetails ¶
SourceDetails stored some details that need to be checked about data source.
type StubDataSource ¶
type StubDataSource struct { testing.Stub DescriptionFunc func() string FetchFunc func(path string) (io.ReadCloser, string, error) URLFunc func(path string) (string, error) PublicSigningKeyFunc func() string SetAllowRetryFunc func(allow bool) PriorityFunc func() int RequireSignedFunc func() bool }
func NewStubDataSource ¶
func NewStubDataSource() *StubDataSource
func (*StubDataSource) Description ¶
func (s *StubDataSource) Description() string
Description implements simplestreams.DataSource.
func (*StubDataSource) Fetch ¶
func (s *StubDataSource) Fetch(path string) (io.ReadCloser, string, error)
Description implements simplestreams.DataSource.
func (*StubDataSource) Priority ¶
func (s *StubDataSource) Priority() int
Description implements simplestreams.DataSource.
func (*StubDataSource) PublicSigningKey ¶
func (s *StubDataSource) PublicSigningKey() string
Description implements simplestreams.DataSource.
func (*StubDataSource) RequireSigned ¶
func (s *StubDataSource) RequireSigned() bool
Description implements simplestreams.DataSource.
func (*StubDataSource) SetAllowRetry ¶
func (s *StubDataSource) SetAllowRetry(allow bool)
Description implements simplestreams.DataSource.
type TestDataSuite ¶
type TestDataSuite struct{}
func (*TestDataSuite) SetUpSuite ¶
func (s *TestDataSuite) SetUpSuite(c *gc.C)
func (*TestDataSuite) TearDownSuite ¶
func (s *TestDataSuite) TearDownSuite(c *gc.C)
Click to show internal directories.
Click to hide internal directories.