Esempio n. 1
0
func SetFakeToolsStorage(useFake bool) {
	if useFake {
		tools.SetToolPrefix("tools_test/juju-")
	} else {
		tools.SetToolPrefix(tools.DefaultToolPrefix)
	}
}
Esempio n. 2
0
func (s *StorageSuite) TestSetToolPrefix(c *gc.C) {
	vers := version.MustParseBinary("1.2.3-precise-amd64")
	tools.SetToolPrefix("test_prefix/juju-")
	path := tools.StorageName(vers)
	c.Assert(path, gc.Equals, "test_prefix/juju-1.2.3-precise-amd64.tgz")
	tools.SetToolPrefix(tools.DefaultToolPrefix)
	path = tools.StorageName(vers)
	c.Assert(path, gc.Equals, "tools/juju-1.2.3-precise-amd64.tgz")
}