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

Unified Diff: state/apiserver/client/perm_test.go

Issue 12522043: Implemented the ServiceUpdate API call.
Patch Set: Implemented the ServiceUpdate API call. Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « state/apiserver/client/client_test.go ('k') | state/megawatcher.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: state/apiserver/client/perm_test.go
=== modified file 'state/apiserver/client/perm_test.go'
--- state/apiserver/client/perm_test.go 2013-07-04 20:12:57 +0000
+++ state/apiserver/client/perm_test.go 2013-08-08 09:29:24 +0000
@@ -65,6 +65,10 @@
op: opClientServiceDeploy,
allow: []string{"user-admin", "user-other"},
}, {
+ about: "Client.ServiceUpdate",
+ op: opClientServiceUpdate,
+ allow: []string{"user-admin", "user-other"},
+}, {
about: "Client.ServiceSetCharm",
op: opClientServiceSetCharm,
allow: []string{"user-admin", "user-other"},
@@ -297,6 +301,21 @@
return func() {}, err
}
+func opClientServiceUpdate(c *C, st *api.State, mst *state.State) (func(), error) {
+ args := params.ServiceUpdate{
+ ServiceName: "no-such-charm",
+ CharmUrl: "cs:series/wordpress-42",
+ ForceCharmUrl: true,
+ SettingsStrings: map[string]string{"blog-title": "foo"},
+ SettingsYAML: `"wordpress": {"blog-title": "foo"}`,
+ }
+ err := st.Client().ServiceUpdate(args)
+ if params.ErrCode(err) == params.CodeNotFound {
+ err = nil
+ }
+ return func() {}, err
+}
+
func opClientServiceSetCharm(c *C, st *api.State, mst *state.State) (func(), error) {
err := st.Client().ServiceSetCharm("nosuch", "local:series/wordpress", false)
if params.ErrCode(err) == params.CodeNotFound {
« no previous file with comments | « state/apiserver/client/client_test.go ('k') | state/megawatcher.go » ('j') | no next file with comments »

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