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

Unified Diff: worker/machiner/machiner_test.go

Issue 6501106: environs: remove VarDir global
Patch Set: environs: remove VarDir global Created 11 years, 6 months ago
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « worker/machiner/machiner.go ('k') | worker/uniter/tools.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: worker/machiner/machiner_test.go
=== modified file 'worker/machiner/machiner_test.go'
--- worker/machiner/machiner_test.go 2012-08-17 09:49:58 +0000
+++ worker/machiner/machiner_test.go 2012-09-12 16:41:30 +0000
@@ -25,18 +25,11 @@
m, err := s.State.AddMachine()
c.Assert(err, IsNil)
- p := machiner.NewMachiner(m)
+ p := machiner.NewMachiner(m, c.MkDir())
c.Assert(p.Stop(), IsNil)
}
func (s *MachinerSuite) TestMachinerDeployDestroy(c *C) {
- dcontainer := newDummyContainer()
- backup := container.Simple
- container.Simple = dcontainer
- defer func() {
- container.Simple = backup
- }()
-
dummyCharm := s.AddTestingCharm(c, "dummy")
loggingCharm := s.AddTestingCharm(c, "logging")
@@ -65,7 +58,8 @@
err = ud0.AssignToMachine(m0)
c.Assert(err, IsNil)
- machiner := machiner.NewMachiner(m0)
+ dcontainer := newDummyContainer()
+ machiner := machiner.NewMachinerWithContainer(m0, dcontainer)
tests := []struct {
change func()
@@ -117,6 +111,8 @@
action chan string
}
+var _ container.Container = (*dummyContainer)(nil)
+
func newDummyContainer() *dummyContainer {
return &dummyContainer{
make(chan string, 5),
« no previous file with comments | « worker/machiner/machiner.go ('k') | worker/uniter/tools.go » ('j') | no next file with comments »

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