~rogpeppe/juju-core/438-local-instance-Addresses

« back to all changes in this revision

Viewing changes to cmd/logging_test.go

  • Committer: Tarmac
  • Author(s): Tim Penhey
  • Date: 2013-09-20 03:21:56 UTC
  • mfrom: (1847.1.9 testbase)
  • Revision ID: tarmac-20130920032156-bdcdz4hd9jzpuim3
[r=thumper] Add a testbase package with no juju-core deps.

The base cleanup and logging suites are now there,
as are the patch functions.

A test also exists there to make sure that no juju-core
dependencies creep in.

https://codereview.appspot.com/13694046/

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
        "launchpad.net/juju-core/cmd"
14
14
        "launchpad.net/juju-core/juju/osenv"
15
15
        "launchpad.net/juju-core/testing"
 
16
        "launchpad.net/juju-core/testing/testbase"
16
17
)
17
18
 
18
19
var logger = loggo.GetLogger("juju.test")
19
20
 
20
21
type LogSuite struct {
21
 
        testing.CleanupSuite
 
22
        testbase.CleanupSuite
22
23
}
23
24
 
24
25
var _ = gc.Suite(&LogSuite{})
59
60
 
60
61
func (s *LogSuite) TestLogConfigFromEnvironment(c *gc.C) {
61
62
        config := "juju.cmd=INFO;juju.worker.deployer=DEBUG"
62
 
        testing.PatchEnvironment(osenv.JujuLoggingConfig, config)
 
63
        testbase.PatchEnvironment(osenv.JujuLoggingConfig, config)
63
64
        log := newLogWithFlags(c, []string{})
64
65
        c.Assert(log.Path, gc.Equals, "")
65
66
        c.Assert(log.Verbose, gc.Equals, false)