1
// Copyright 2012, 2013 Canonical Ltd.
2
// Licensed under the AGPLv3, see LICENCE file for details.
11
gc "launchpad.net/gocheck"
13
"launchpad.net/juju-core/store"
14
"launchpad.net/juju-core/testing/testbase"
17
type ConfigSuite struct {
21
var _ = gc.Suite(&ConfigSuite{})
24
mongo-url: localhost:23456
29
func (s *ConfigSuite) SetUpSuite(c *gc.C) {
30
s.LoggingSuite.SetUpSuite(c)
33
func (s *ConfigSuite) TearDownSuite(c *gc.C) {
34
s.LoggingSuite.TearDownSuite(c)
37
func (s *ConfigSuite) TestReadConfig(c *gc.C) {
39
f, err := os.Create(path.Join(confDir, "charmd.conf"))
40
c.Assert(err, gc.IsNil)
44
fmt.Fprint(f, testConfig)
47
dstr, err := store.ReadConfig(cfgPath)
48
c.Assert(err, gc.IsNil)
49
c.Assert(dstr.MongoURL, gc.Equals, "localhost:23456")