Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(417)

Side by Side Diff: cmd/jujud/provisioning_test.go

Issue 6501106: environs: remove VarDir global
Patch Set: environs: remove VarDir global Created 11 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cmd/jujud/machine_test.go ('k') | cmd/jujud/unit.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 package main 1 package main
2 2
3 import ( 3 import (
4 . "launchpad.net/gocheck" 4 . "launchpad.net/gocheck"
5 "launchpad.net/juju-core/cmd" 5 "launchpad.net/juju-core/cmd"
6 "launchpad.net/juju-core/environs/dummy" 6 "launchpad.net/juju-core/environs/dummy"
7 "launchpad.net/juju-core/juju/testing" 7 "launchpad.net/juju-core/juju/testing"
8 "reflect" 8 "reflect"
9 "time" 9 "time"
10 ) 10 )
(...skipping 17 matching lines...) Expand all
28 err := ParseAgentCommand(a, []string{"nincompoops"}) 28 err := ParseAgentCommand(a, []string{"nincompoops"})
29 c.Assert(err, ErrorMatches, `unrecognized args: \["nincompoops"\]`) 29 c.Assert(err, ErrorMatches, `unrecognized args: \["nincompoops"\]`)
30 } 30 }
31 31
32 func (s *ProvisioningSuite) TestRunStop(c *C) { 32 func (s *ProvisioningSuite) TestRunStop(c *C) {
33 op := make(chan dummy.Operation, 200) 33 op := make(chan dummy.Operation, 200)
34 dummy.Listen(op) 34 dummy.Listen(op)
35 35
36 a := &ProvisioningAgent{ 36 a := &ProvisioningAgent{
37 Conf: AgentConf{ 37 Conf: AgentConf{
38 » » » JujuDir: "/var/lib/juju", 38 » » » DataDir: "/var/lib/juju",
39 StateInfo: *s.StateInfo(c), 39 StateInfo: *s.StateInfo(c),
40 }, 40 },
41 } 41 }
42 done := make(chan error) 42 done := make(chan error)
43 go func() { 43 go func() {
44 done <- a.Run(nil) 44 done <- a.Run(nil)
45 }() 45 }()
46 46
47 // Check that the provisioner is alive by doing a rudimentary check 47 // Check that the provisioner is alive by doing a rudimentary check
48 // that it responds to state changes. 48 // that it responds to state changes.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 return op 97 return op
98 } 98 }
99 } 99 }
100 c.Logf("discarding unknown event %#v", op) 100 c.Logf("discarding unknown event %#v", op)
101 case <-time.After(2 * time.Second): 101 case <-time.After(2 * time.Second):
102 c.Fatalf("time out wating for operation") 102 c.Fatalf("time out wating for operation")
103 } 103 }
104 } 104 }
105 panic("not reached") 105 panic("not reached")
106 } 106 }
OLDNEW
« no previous file with comments | « cmd/jujud/machine_test.go ('k') | cmd/jujud/unit.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b