"launchpad.net/golxc"
@@ -20,7 +19,7 @@
var lxcfile = `# MIRROR to be used by ubuntu template at container
creation:
# Leaving it undefined is fine
#MIRROR="http://archive.ubuntu.com/ubuntu"
-# or
+# or
#MIRROR="http://<host-ip-addr>:3142/archive.ubuntu.com/ubuntu"
# LXC_AUTO - whether or not to start containers symlinked under
@@ -357,13 +356,14 @@
}
type commandArgs struct {
- logging.LoggingSuite
+ testing.IsolationSuite
}
var _ = Suite(&commandArgs{})
func (s *commandArgs) TestCreateArgs(c *C) {
s.PatchValue(&golxc.ContainerDir, c.MkDir())
+ s.PatchEnvironment("PATH", "/usr/bin") // Required by lxc-create -> tee.
testing.PatchExecutableAsEchoArgs(c, s, "lxc-create")
factory := golxc.Factory()
@@ -386,6 +386,7 @@
func (s *commandArgs) TestCloneArgs(c *C) {
dir := c.MkDir()
s.PatchValue(&golxc.ContainerDir, dir)
+ s.PatchEnvironment("PATH", "/usr/bin") // Required by lxc-create -> tee.
// Patch lxc-info too as clone checks to see if it is running.
testing.PatchExecutableAsEchoArgs(c, s, "lxc-info")
testing.PatchExecutableAsEchoArgs(c, s, "lxc-clone")
Reviewers: mp+221210_ code.launchpad. net,
Message:
Please take a look.
Description:
Replace LoggingSuite with IsolationSuite.
The logging package no longer exist in github. com/juju/ testing.
https:/ /code.launchpad .net/~frankban/ golxc/fix- logging- suite/+ merge/221210
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/92660046/
Affected files (+6, -3 lines):
A [revision details]
M golxc_test.go
Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: <email address hidden>
+New revision:
<email address hidden>
Index: golxc_test.go
=== modified file 'golxc_test.go'
--- golxc_test.go 2014-03-11 00:34:54 +0000
+++ golxc_test.go 2014-05-28 11:48:02 +0000
@@ -11,7 +11,6 @@
"github. com/juju/ testing" com/juju/ testing/ checkers" com/juju/ testing/ logging" net/gocheck"
jc "github.
- "github.
. "launchpad.
"launchpad. net/golxc" archive. ubuntu. com/ubuntu" addr>:3142/ archive. ubuntu. com/ubuntu"
@@ -20,7 +19,7 @@
var lxcfile = `# MIRROR to be used by ubuntu template at container
creation:
# Leaving it undefined is fine
#MIRROR="http://
-# or
+# or
#MIRROR="http://<host-ip-
# LXC_AUTO - whether or not to start containers symlinked under
@@ -357,13 +356,14 @@
}
type commandArgs struct { LoggingSuite IsolationSuite
- logging.
+ testing.
}
var _ = Suite(& commandArgs{ })
func (s *commandArgs) TestCreateArgs(c *C) { (&golxc. ContainerDir, c.MkDir()) ent("PATH" , "/usr/bin") // Required by lxc-create -> tee. PatchExecutable AsEchoArgs( c, s, "lxc-create")
s.PatchValue
+ s.PatchEnvironm
testing.
factory := golxc.Factory() (&golxc. ContainerDir, dir) ent("PATH" , "/usr/bin") // Required by lxc-create -> tee. PatchExecutable AsEchoArgs( c, s, "lxc-info") PatchExecutable AsEchoArgs( c, s, "lxc-clone")
@@ -386,6 +386,7 @@
func (s *commandArgs) TestCloneArgs(c *C) {
dir := c.MkDir()
s.PatchValue
+ s.PatchEnvironm
// Patch lxc-info too as clone checks to see if it is running.
testing.
testing.