Merge lp:~waigani/juju-core/juju-env-test-isolation into lp:~go-bot/juju-core/trunk

Proposed by Jesse Meek
Status: Merged
Approved by: Jesse Meek
Approved revision: no longer in the source branch.
Merged at revision: 2331
Proposed branch: lp:~waigani/juju-core/juju-env-test-isolation
Merge into: lp:~go-bot/juju-core/trunk
Diff against target: 11 lines (+1/-0)
1 file modified
juju/testing/conn.go (+1/-0)
To merge this branch: bzr merge lp:~waigani/juju-core/juju-env-test-isolation
Reviewer Review Type Date Requested Status
Juju Engineering Pending
Review via email: mp+206069@code.launchpad.net

Commit message

Fixes lp:1194902 JUJU_ENV not isolated in tests.

Patches JUJU_ENV with empty string.

Description of the change

Fixes lp:1194902 JUJU_ENV not isolated in tests

Patches JUJU_ENV with empty string

https://codereview.appspot.com/62710043/

To post a comment you must log in.
Revision history for this message
Jesse Meek (waigani) wrote :

Reviewers: mp+206069_code.launchpad.net,

Message:
Please take a look.

Description:
Fixes lp:1194902 JUJU_ENV not isolated in tests

Patches JUJU_ENV with empty string

https://code.launchpad.net/~waigani/juju-core/juju-env-test-isolation/+merge/206069

(do not edit description out of merge proposal)

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

Affected files (+3, -0 lines):
   A [revision details]
   M juju/testing/conn.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-20140212104804-efzwkwx2hex64wjq
+New revision: <email address hidden>

Index: juju/testing/conn.go
=== modified file 'juju/testing/conn.go'
--- juju/testing/conn.go 2014-01-30 13:50:27 +0000
+++ juju/testing/conn.go 2014-02-13 00:54:09 +0000
@@ -180,6 +180,7 @@
   dataDir := filepath.Join(s.RootDir, "/var/lib/juju")
   err = os.MkdirAll(dataDir, 0777)
   c.Assert(err, gc.IsNil)
+ s.PatchEnvironment(osenv.JujuEnvEnvKey, "")

   // TODO(rog) remove these files and add them only when
   // the tests specifically need them (in cmd/juju for example)

Revision history for this message
Andrew Wilkins (axwalk) wrote :

On 2014/02/13 01:03:04, waigani wrote:
> Please take a look.

Have you tested this by setting JUJU_ENV? Are no other packages
affected?

https://codereview.appspot.com/62710043/

Revision history for this message
Jesse Meek (waigani) wrote :

On 2014/02/13 08:50:48, axw wrote:
> On 2014/02/13 01:03:04, waigani wrote:
> > Please take a look.

> Have you tested this by setting JUJU_ENV? Are no other packages
affected?

I ran: JUJU_ENV="foobar" go test launchpad.net/juju-core/...

All tests passed.

https://codereview.appspot.com/62710043/

Revision history for this message
Andrew Wilkins (axwalk) wrote :

On 2014/02/13 21:21:19, waigani wrote:
> On 2014/02/13 08:50:48, axw wrote:
> > On 2014/02/13 01:03:04, waigani wrote:
> > > Please take a look.
> >
> > Have you tested this by setting JUJU_ENV? Are no other packages
affected?

> I ran: JUJU_ENV="foobar" go test launchpad.net/juju-core/...

> All tests passed.

Thanks for confirming. LGTM

https://codereview.appspot.com/62710043/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'juju/testing/conn.go'
2--- juju/testing/conn.go 2014-01-30 13:50:27 +0000
3+++ juju/testing/conn.go 2014-02-13 00:58:47 +0000
4@@ -180,6 +180,7 @@
5 dataDir := filepath.Join(s.RootDir, "/var/lib/juju")
6 err = os.MkdirAll(dataDir, 0777)
7 c.Assert(err, gc.IsNil)
8+ s.PatchEnvironment(osenv.JujuEnvEnvKey, "")
9
10 // TODO(rog) remove these files and add them only when
11 // the tests specifically need them (in cmd/juju for example)

Subscribers

People subscribed via source and target branches

to status/vote changes: