|
New test suite: BaseSuite
A new base test suite is introduced. It is to
replace LoggingSuite as the preferred suite
which all test suites should encapsulate.
BaseSuite itseld encapsulates LoggingSuite, plus
provides:
- isolation of user home via creation of temp home
and setting of $HOME
- flag to ensure tests will error if outgoing
network access is attempted
Much of the implementation was moved across from
testing/environs.go. There were a number of
slightly different methods to create a fake Juju
home setup - these have been consolidated and
simplified.
The flag to turn off outgoing network access when
running tests is off until the tests are fixed.
Not all tests have been updated to use the new
suite; only those affected by the refactoring
have been fixed for now.
https://code.launchpad.net/~wallyworld/juju-core/network-test-isolation/+merge/219633
(do not edit description out of merge proposal)
Total comments: 11
Total comments: 7
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+617 lines, -628 lines) |
Patch |
|
A |
[revision details]
|
View
|
1
2
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
cmd/envcmd/environmentcommand_test.go
|
View
|
1
|
4 chunks |
+11 lines, -13 lines |
0 comments
|
Download
|
|
M |
cmd/filevar_test.go
|
View
|
1
|
3 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
cmd/juju/authorizedkeys_test.go
|
View
|
1
|
2 chunks |
+1 line, -13 lines |
0 comments
|
Download
|
|
M |
cmd/juju/bootstrap_test.go
|
View
|
1
|
15 chunks |
+23 lines, -31 lines |
0 comments
|
Download
|
|
M |
cmd/juju/cmd_test.go
|
View
|
1
|
2 chunks |
+1 line, -3 lines |
0 comments
|
Download
|
|
M |
cmd/juju/debuglog_test.go
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
cmd/juju/helptool_test.go
|
View
|
1
|
1 chunk |
+1 line, -9 lines |
0 comments
|
Download
|
|
M |
cmd/juju/init_test.go
|
View
|
1
|
5 chunks |
+3 lines, -4 lines |
0 comments
|
Download
|
|
M |
cmd/juju/main_test.go
|
View
|
1
|
3 chunks |
+0 lines, -3 lines |
0 comments
|
Download
|
|
M |
cmd/juju/plugin_test.go
|
View
|
|
1 chunk |
+3 lines, -7 lines |
0 comments
|
Download
|
|
M |
cmd/juju/publish_test.go
|
View
|
|
4 chunks |
+6 lines, -9 lines |
0 comments
|
Download
|
|
M |
cmd/juju/run_test.go
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
cmd/juju/switch_test.go
|
View
|
1
|
5 chunks |
+17 lines, -19 lines |
0 comments
|
Download
|
|
M |
cmd/juju/synctools_test.go
|
View
|
1
|
3 chunks |
+4 lines, -7 lines |
0 comments
|
Download
|
|
M |
cmd/jujud/machine_test.go
|
View
|
|
1 chunk |
+1 line, -3 lines |
0 comments
|
Download
|
|
M |
cmd/plugins/juju-metadata/imagemetadata_test.go
|
View
|
1
|
4 chunks |
+7 lines, -18 lines |
0 comments
|
Download
|
|
M |
cmd/plugins/juju-metadata/metadataplugin_test.go
|
View
|
1
|
2 chunks |
+1 line, -9 lines |
0 comments
|
Download
|
|
M |
cmd/plugins/juju-metadata/toolsmetadata_test.go
|
View
|
1
|
2 chunks |
+2 lines, -6 lines |
0 comments
|
Download
|
|
M |
cmd/plugins/juju-metadata/validateimagemetadata_test.go
|
View
|
1
|
2 chunks |
+3 lines, -10 lines |
0 comments
|
Download
|
|
M |
cmd/plugins/juju-metadata/validatetoolsmetadata_test.go
|
View
|
1
|
2 chunks |
+3 lines, -10 lines |
0 comments
|
Download
|
|
M |
container/lxc/testing/test.go
|
View
|
1
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
doc/how-to-write-tests.txt
|
View
|
1
|
3 chunks |
+26 lines, -19 lines |
0 comments
|
Download
|
|
M |
environs/bootstrap/bootstrap_test.go
|
View
|
|
2 chunks |
+3 lines, -7 lines |
0 comments
|
Download
|
|
M |
environs/config/config_test.go
|
View
|
1
|
14 chunks |
+35 lines, -50 lines |
0 comments
|
Download
|
|
M |
environs/config_test.go
|
View
|
1
|
11 chunks |
+8 lines, -15 lines |
0 comments
|
Download
|
|
M |
environs/emptystorage_test.go
|
View
|
1
|
4 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
|
M |
environs/imagemetadata/urls_test.go
|
View
|
|
1 chunk |
+3 lines, -6 lines |
0 comments
|
Download
|
|
M |
environs/open_test.go
|
View
|
1
|
13 chunks |
+19 lines, -20 lines |
0 comments
|
Download
|
|
M |
environs/storage/storage_test.go
|
View
|
1
|
3 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
|
M |
environs/sync/sync_test.go
|
View
|
1
|
6 chunks |
+9 lines, -10 lines |
0 comments
|
Download
|
|
M |
environs/tools/urls_test.go
|
View
|
|
1 chunk |
+3 lines, -6 lines |
0 comments
|
Download
|
|
M |
juju/apiconn_test.go
|
View
|
1
|
18 chunks |
+19 lines, -26 lines |
0 comments
|
Download
|
|
M |
juju/conn_test.go
|
View
|
1
|
4 chunks |
+9 lines, -9 lines |
0 comments
|
Download
|
|
M |
juju/testing/conn.go
|
View
|
1
|
4 chunks |
+5 lines, -6 lines |
0 comments
|
Download
|
|
M |
provider/common/bootstrap_test.go
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
provider/common/supportedarchitectures_test.go
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
provider/joyent/config_test.go
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
provider/joyent/joyent_test.go
|
View
|
|
2 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
provider/local/environprovider_test.go
|
View
|
|
1 chunk |
+2 lines, -5 lines |
0 comments
|
Download
|
|
M |
provider/manual/config_test.go
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
provider/manual/environ_test.go
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
provider/manual/provider_test.go
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
provider/openstack/config_test.go
|
View
|
|
3 chunks |
+4 lines, -8 lines |
0 comments
|
Download
|
|
A |
testing/base.go
|
View
|
1
|
1 chunk |
+127 lines, -0 lines |
0 comments
|
Download
|
|
A |
testing/base_test.go
|
View
|
1
|
1 chunk |
+40 lines, -0 lines |
0 comments
|
Download
|
|
M |
testing/environ.go
|
View
|
1
|
2 chunks |
+43 lines, -154 lines |
0 comments
|
Download
|
|
D |
testing/environ_test.go
|
View
|
1
2
|
1 chunk |
+54 lines, -0 lines |
0 comments
|
Download
|
|
D |
testing/environ_test.go
|
View
|
2
|
1 chunk |
+0 lines, -56 lines |
0 comments
|
Download
|
|
M |
upgrades/dotprofile_test.go
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
upgrades/lockdirectory_test.go
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
utils/export_test.go
|
View
|
1
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
utils/http.go
|
View
|
1
2
|
4 chunks |
+25 lines, -0 lines |
0 comments
|
Download
|
|
M |
utils/http_test.go
|
View
|
1
2
|
3 chunks |
+49 lines, -6 lines |
0 comments
|
Download
|
|
M |
utils/ssh/authorisedkeys_test.go
|
View
|
1
|
3 chunks |
+2 lines, -9 lines |
0 comments
|
Download
|
|
M |
utils/ssh/clientkeys_test.go
|
View
|
1
|
1 chunk |
+2 lines, -5 lines |
0 comments
|
Download
|
Total messages: 9
|