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 { |