~sidnei/juju-core/lxc-clone-with-overlayfs

« back to all changes in this revision

Viewing changes to worker/uniter/debug/common_test.go

  • Committer: Sidnei da Silva
  • Date: 2013-10-21 18:33:07 UTC
  • mfrom: (1667.1.329 juju-core)
  • Revision ID: sidnei.da.silva@canonical.com-20131021183307-fylyr68s4gtbxr08
- Merge from trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
import (
7
7
        "testing"
8
8
 
9
 
        . "launchpad.net/gocheck"
 
9
        gc "launchpad.net/gocheck"
10
10
 
11
11
        "launchpad.net/juju-core/worker/uniter/debug"
12
12
)
13
13
 
14
14
type DebugHooksCommonSuite struct{}
15
15
 
16
 
var _ = Suite(&DebugHooksCommonSuite{})
 
16
var _ = gc.Suite(&DebugHooksCommonSuite{})
17
17
 
18
18
func TestPackage(t *testing.T) {
19
 
        TestingT(t)
 
19
        gc.TestingT(t)
20
20
}
21
21
 
22
22
// TestCommonScript tests the behaviour of HooksContext.
23
 
func (*DebugHooksCommonSuite) TestHooksContext(c *C) {
 
23
func (*DebugHooksCommonSuite) TestHooksContext(c *gc.C) {
24
24
        ctx := debug.NewHooksContext("foo/8")
25
 
        c.Assert(ctx.Unit, Equals, "foo/8")
26
 
        c.Assert(ctx.FlockDir, Equals, "/tmp")
 
25
        c.Assert(ctx.Unit, gc.Equals, "foo/8")
 
26
        c.Assert(ctx.FlockDir, gc.Equals, "/tmp")
27
27
        ctx.FlockDir = "/var/lib/juju"
28
 
        c.Assert(ctx.ClientFileLock(), Equals, "/var/lib/juju/juju-unit-foo-8-debug-hooks")
29
 
        c.Assert(ctx.ClientExitFileLock(), Equals, "/var/lib/juju/juju-unit-foo-8-debug-hooks-exit")
 
28
        c.Assert(ctx.ClientFileLock(), gc.Equals, "/var/lib/juju/juju-unit-foo-8-debug-hooks")
 
29
        c.Assert(ctx.ClientExitFileLock(), gc.Equals, "/var/lib/juju/juju-unit-foo-8-debug-hooks-exit")
30
30
}