|
state/api: implement APIHostPorts methods
We also refactor the API client tests a little, factoring
out the API address-related tests into their
own suite alongside the existing EnvironWatcherTests.
Some changes to existing code:
EnvironWatcherTest renamed to EnvironWatcherTests because
plural seems better when it's there for multiple tests.
I don't see a particular use for passing the backing state
separately to NewEnvironWatcherTests, when the backing
state will do for both purposes.
The error field in the return from EnvironConfig is redundant, so
has been removed. Any client should be checking the
error return from the API call anyway, so it should
not have any adverse effect.
api/common/testing moved to api/testing - because
"apitesting" seems like a nice import identifier and it
will be a good place to have other api-related test
functionality if we need it.
https://code.launchpad.net/~rogpeppe/juju-core/526-APIHostPorts-api/+merge/212219
(do not edit description out of merge proposal)
Total comments: 17
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+399 lines, -277 lines) |
Patch |
 |
A |
[revision details]
|
View
|
1
2
3
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
A |
state/api/common/apiaddresser.go
|
View
|
1
2
3
|
1 chunk |
+71 lines, -0 lines |
0 comments
|
Download
|
 |
M |
state/api/common/environwatcher.go
|
View
|
1
2
3
|
1 chunk |
+9 lines, -16 lines |
0 comments
|
Download
|
 |
M |
state/api/deployer/deployer.go
|
View
|
|
2 chunks |
+6 lines, -21 lines |
0 comments
|
Download
|
 |
M |
state/api/deployer/deployer_test.go
|
View
|
1
|
5 chunks |
+6 lines, -23 lines |
0 comments
|
Download
|
 |
M |
state/api/environment/environment_test.go
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
state/api/firewaller/firewaller.go
|
View
|
|
1 chunk |
+0 lines, -3 lines |
0 comments
|
Download
|
 |
M |
state/api/machiner/machiner.go
|
View
|
|
1 chunk |
+6 lines, -1 line |
0 comments
|
Download
|
 |
M |
state/api/machiner/machiner_test.go
|
View
|
1
|
8 chunks |
+17 lines, -8 lines |
0 comments
|
Download
|
 |
M |
state/api/params/internal.go
|
View
|
|
2 chunks |
+8 lines, -2 lines |
0 comments
|
Download
|
 |
M |
state/api/provisioner/provisioner.go
|
View
|
1
|
5 chunks |
+14 lines, -29 lines |
0 comments
|
Download
|
 |
M |
state/api/provisioner/provisioner_test.go
|
View
|
1
|
5 chunks |
+7 lines, -23 lines |
0 comments
|
Download
|
 |
M |
state/api/rsyslog/rsyslog_test.go
|
View
|
|
2 chunks |
+4 lines, -5 lines |
0 comments
|
Download
|
 |
A |
state/api/testing/apiaddresser.go
|
View
|
1
2
3
|
1 chunk |
+101 lines, -0 lines |
0 comments
|
Download
|
 |
M |
state/api/testing/environwatcher.go
|
View
|
|
2 chunks |
+21 lines, -19 lines |
0 comments
|
Download
|
 |
M |
state/api/uniter/charm.go
|
View
|
1
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
state/api/uniter/relationunit.go
|
View
|
1
|
5 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
state/api/uniter/service.go
|
View
|
1
|
4 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
state/api/uniter/settings.go
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
state/api/uniter/state_test.go
|
View
|
1
2
3
|
2 chunks |
+8 lines, -26 lines |
0 comments
|
Download
|
 |
M |
state/api/uniter/unit.go
|
View
|
1
|
19 chunks |
+19 lines, -19 lines |
0 comments
|
Download
|
 |
M |
state/api/uniter/uniter.go
|
View
|
1
2
|
8 chunks |
+16 lines, -22 lines |
0 comments
|
Download
|
 |
M |
state/api/uniter/uniter_test.go
|
View
|
|
2 chunks |
+0 lines, -15 lines |
0 comments
|
Download
|
 |
M |
state/apiserver/common/addresses.go
|
View
|
|
4 chunks |
+42 lines, -14 lines |
0 comments
|
Download
|
 |
M |
state/apiserver/common/addresses_test.go
|
View
|
|
4 chunks |
+17 lines, -6 lines |
0 comments
|
Download
|
 |
M |
state/apiserver/common/environwatcher.go
|
View
|
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
state/apiserver/common/environwatcher_test.go
|
View
|
|
4 chunks |
+1 line, -4 lines |
0 comments
|
Download
|
 |
M |
state/apiserver/common/testing/environwatcher.go
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
state/apiserver/deployer/deployer.go
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
state/apiserver/machine/machiner.go
|
View
|
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
state/apiserver/provisioner/provisioner.go
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
state/apiserver/uniter/uniter.go
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Total messages: 3
|