Example #1
0
func (s *fetchDataSuite) setupDataSource(key string) {
	s.source = testing.NewStubDataSource()
	s.source.FetchFunc = func(path string) (io.ReadCloser, string, error) {
		r := bytes.NewReader([]byte(s.readerData))
		return ioutil.NopCloser(r), path, nil
	}
	s.source.PublicSigningKeyFunc = func() string {
		return key
	}
}
Example #2
0
func (s *fetchDataSuite) SetUpTest(c *gc.C) {
	s.source = testing.NewStubDataSource()
}