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

Issue 6853043: testing: add FakeRootSuite

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 6 months ago by rog
Modified:
11 years, 6 months ago
Reviewers:
mp+134112, niemeyer, TheMue
Visibility:
Public.

Description

testing: add FakeRootSuite Use it where appropriate. This fixes various places where tests were dependent on $HOME containing an accessible .ssh directory. https://code.launchpad.net/~rogpeppe/juju-core/141-test-HOME-independence/+merge/134112 Requires: https://code.launchpad.net/~rogpeppe/juju-core/142-jujutest-attrs/+merge/134080 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : testing: add FakeRootSuite #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+315 lines, -183 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/juju/main_test.go View 3 chunks +11 lines, -20 lines 0 comments Download
M environs/config/config_test.go View 2 chunks +38 lines, -27 lines 0 comments Download
M environs/config_test.go View 1 7 chunks +43 lines, -34 lines 1 comment Download
M environs/dummy/config_test.go View 1 chunk +7 lines, -5 lines 0 comments Download
M environs/dummy/environs_test.go View 2 chunks +62 lines, -8 lines 0 comments Download
M environs/ec2/config_test.go View 2 chunks +5 lines, -13 lines 0 comments Download
M environs/ec2/local_test.go View 1 5 chunks +10 lines, -10 lines 0 comments Download
M juju/conn_test.go View 9 chunks +44 lines, -43 lines 1 comment Download
M juju/testing/conn.go View 7 chunks +12 lines, -23 lines 4 comments Download
A testing/fakeroot.go View 1 chunk +81 lines, -0 lines 0 comments Download

Messages

Total messages: 4
rog
Please take a look.
11 years, 6 months ago (2012-11-13 14:41:20 UTC) #1
TheMue
Mostly OK, but one comment and one question. https://codereview.appspot.com/6853043/diff/2001/environs/config_test.go File environs/config_test.go (right): https://codereview.appspot.com/6853043/diff/2001/environs/config_test.go#newcode100 environs/config_test.go:100: func ...
11 years, 6 months ago (2012-11-13 15:11:47 UTC) #2
rog
https://codereview.appspot.com/6853043/diff/2001/juju/testing/conn.go File juju/testing/conn.go (right): https://codereview.appspot.com/6853043/diff/2001/juju/testing/conn.go#newcode142 juju/testing/conn.go:142: panic("DataDir called out of test context") On 2012/11/13 15:11:47, ...
11 years, 6 months ago (2012-11-13 15:35:42 UTC) #3
niemeyer
11 years, 6 months ago (2012-11-15 00:28:27 UTC) #4
https://codereview.appspot.com/6853043/diff/2001/juju/conn_test.go
File juju/conn_test.go (right):

https://codereview.appspot.com/6853043/diff/2001/juju/conn_test.go#newcode31
juju/conn_test.go:31: cs.FakeRootSuite.SetUpTest(c)
As we discussed on IRC, the whole is getting deeper, and there isn't a clear
benefit. None of the tests below needed the fake root, and now we're adding more
harness, and more logic, just because we can.
Sign in to reply to this message.

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