Merge lp:~thumper/juju-core/fix-test-creating-file-in-tree into lp:~go-bot/juju-core/trunk

Proposed by Tim Penhey
Status: Merged
Approved by: John A Meinel
Approved revision: no longer in the source branch.
Merged at revision: 1281
Proposed branch: lp:~thumper/juju-core/fix-test-creating-file-in-tree
Merge into: lp:~go-bot/juju-core/trunk
Diff against target: 36 lines (+3/-2)
1 file modified
cmd/juju/plugin_test.go (+3/-2)
To merge this branch: bzr merge lp:~thumper/juju-core/fix-test-creating-file-in-tree
Reviewer Review Type Date Requested Status
Juju Engineering Pending
Review via email: mp+169324@code.launchpad.net

Commit message

Fix the cmd/juju tests.

One of the tests was emitting an error, but the suite wasn't
a logging suite, so it was being output to stderr.

Also, there was a file called 2 created in the directory. This
was due to an echo >2 line in a plugin test script. This was
wrong anyway, we don't emit missing description as it fails other
tests. This has been removed.

https://codereview.appspot.com/10253053/

Description of the change

Fix the cmd/juju tests.

One of the tests was emitting an error, but the suite wasn't
a logging suite, so it was being output to stderr.

Also, there was a file called 2 created in the directory. This
was due to an echo >2 line in a plugin test script. This was
wrong anyway, we don't emit missing description as it fails other
tests. This has been removed.

https://codereview.appspot.com/10253053/

To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) wrote :

Reviewers: mp+169324_code.launchpad.net,

Message:
Please take a look.

Description:
Fix the cmd/juju tests.

One of the tests was emitting an error, but the suite wasn't
a logging suite, so it was being output to stderr.

Also, there was a file called 2 created in the directory. This
was due to an echo >2 line in a plugin test script. This was
wrong anyway, we don't emit missing description as it fails other
tests. This has been removed.

https://code.launchpad.net/~thumper/juju-core/fix-test-creating-file-in-tree/+merge/169324

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/10253053/

Affected files:
   A [revision details]
   M cmd/juju/plugin_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: tarmac-20130613115315-e58eqa122kc07o1a
+New revision: <email address hidden>

Index: cmd/juju/plugin_test.go
=== modified file 'cmd/juju/plugin_test.go'
--- cmd/juju/plugin_test.go 2013-06-13 10:56:08 +0000
+++ cmd/juju/plugin_test.go 2013-06-14 02:08:04 +0000
@@ -17,6 +17,7 @@
  )

  type PluginSuite struct {
+ testing.LoggingSuite
   oldPath string
   home *testing.FakeHome
  }
@@ -24,6 +25,7 @@
  var _ = Suite(&PluginSuite{})

  func (suite *PluginSuite) SetUpTest(c *C) {
+ suite.LoggingSuite.SetUpTest(c)
   suite.oldPath = os.Getenv("PATH")
   suite.home = testing.MakeSampleHome(c)
   os.Setenv("PATH", "/bin:"+testing.HomePath())
@@ -32,6 +34,7 @@
  func (suite *PluginSuite) TearDownTest(c *C) {
   suite.home.Restore()
   os.Setenv("PATH", suite.oldPath)
+ suite.LoggingSuite.TearDownTest(c)
  }

  func (*PluginSuite) TestFindPlugins(c *C) {
@@ -195,8 +198,6 @@
    fi
    echo "{{.Name}} description"
    exit {{.ExitStatus}}
-else
- echo "No --description" >2
  fi

  if [ "$1" = "--help" ]; then

Revision history for this message
Ian Booth (wallyworld) wrote :
Revision history for this message
William Reade (fwereade) wrote :
Revision history for this message
John A Meinel (jameinel) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2013-06-14 6:13, Tim Penhey wrote:
> Tim Penhey has proposed merging
> lp:~thumper/juju-core/fix-test-creating-file-in-tree into
> lp:juju-core.
>
> Requested reviews: juju hackers (juju)
>
> For more details, see:
> https://code.launchpad.net/~thumper/juju-core/fix-test-creating-file-in-tree/+merge/169324
>
> Fix the cmd/juju tests.
>
> One of the tests was emitting an error, but the suite wasn't a
> logging suite, so it was being output to stderr.
>
> Also, there was a file called 2 created in the directory. This was
> due to an echo >2 line in a plugin test script. This was wrong
> anyway, we don't emit missing description as it fails other tests.
> This has been removed.
>
> https://codereview.appspot.com/10253053/
>

LGTM trivial

I think the second one was my fault. I was debugging what was going
on, and meant to be typing ">&2". Anyway, I wanted it removed
regardless. Thanks for noticing.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEUEARECAAYFAlG9d5kACgkQJdeBCYSNAAOiTACYkygrEGQfYREiVeszGgHKrhqQ
GQCg2QbrXLJiZ7eh7w8+nTML3Zlz+L4=
=KxJ0
-----END PGP SIGNATURE-----

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cmd/juju/plugin_test.go'
2--- cmd/juju/plugin_test.go 2013-06-13 10:56:08 +0000
3+++ cmd/juju/plugin_test.go 2013-06-14 02:12:27 +0000
4@@ -17,6 +17,7 @@
5 )
6
7 type PluginSuite struct {
8+ testing.LoggingSuite
9 oldPath string
10 home *testing.FakeHome
11 }
12@@ -24,6 +25,7 @@
13 var _ = Suite(&PluginSuite{})
14
15 func (suite *PluginSuite) SetUpTest(c *C) {
16+ suite.LoggingSuite.SetUpTest(c)
17 suite.oldPath = os.Getenv("PATH")
18 suite.home = testing.MakeSampleHome(c)
19 os.Setenv("PATH", "/bin:"+testing.HomePath())
20@@ -32,6 +34,7 @@
21 func (suite *PluginSuite) TearDownTest(c *C) {
22 suite.home.Restore()
23 os.Setenv("PATH", suite.oldPath)
24+ suite.LoggingSuite.TearDownTest(c)
25 }
26
27 func (*PluginSuite) TestFindPlugins(c *C) {
28@@ -195,8 +198,6 @@
29 fi
30 echo "{{.Name}} description"
31 exit {{.ExitStatus}}
32-else
33- echo "No --description" >2
34 fi
35
36 if [ "$1" = "--help" ]; then

Subscribers

People subscribed via source and target branches

to status/vote changes: