Exemple #1
0
func currentMongoPath() string {
	return environs.MongoStoragePath(version.CurrentSeries(), version.CurrentArch())
}
Exemple #2
0
}

var mongoURLTests = []struct {
	summary        string   // a summary of the test purpose.
	contents       []string // names in private storage.
	publicContents []string // names in public storage.
	expect         string   // the name we expect to find (if no error).
	urlpart        string   // part of the url we expect to find (if not blank).
}{{
	summary:  "grab mongo from private storage if it exists there",
	contents: []string{currentMongoPath()},
	expect:   currentMongoPath(),
}, {
	summary: "fall back to public storage when nothing found in private",
	contents: []string{
		environs.MongoStoragePath("foo", version.CurrentArch()),
	},
	publicContents: []string{
		currentMongoPath(),
	},
	expect: "public-" + currentMongoPath(),
}, {
	summary: "if nothing in public or private storage, fall back to copy in ec2",
	contents: []string{
		environs.MongoStoragePath("foo", version.CurrentArch()),
		environs.MongoStoragePath(version.CurrentSeries(), "foo"),
	},
	publicContents: []string{
		environs.MongoStoragePath("foo", version.CurrentArch()),
	},
	urlpart: "http://juju-dist.s3.amazonaws.com",