Code review comment for lp:~frankban/golxc/fix-logging-suite

Revision history for this message
Francesco Banconi (frankban) wrote :

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"
   jc "github.com/juju/testing/checkers"
- "github.com/juju/testing/logging"
   . "launchpad.net/gocheck"

   "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")

« Back to merge proposal