~wallyworld/juju-core/1304742-backport-1.18

« back to all changes in this revision

Viewing changes to state/apiserver/perm_test.go

Merge prev pipe.

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
        op:    opClientServiceDeploy,
65
65
        allow: []string{"user-admin", "user-other"},
66
66
}, {
 
67
        about: "Client.ServiceSetCharm",
 
68
        op:    opClientServiceSetCharm,
 
69
        allow: []string{"user-admin", "user-other"},
 
70
}, {
67
71
        about: "Client.GetAnnotations",
68
72
        op:    opClientGetAnnotations,
69
73
        allow: []string{"user-admin", "user-other"},
292
296
        return func() {}, err
293
297
}
294
298
 
 
299
func opClientServiceSetCharm(c *C, st *api.State, mst *state.State) (func(), error) {
 
300
        err := st.Client().ServiceSetCharm("nosuch", "local:series/wordpress", false)
 
301
        if api.ErrCode(err) == api.CodeNotFound {
 
302
                err = nil
 
303
        }
 
304
        return func() {}, err
 
305
}
 
306
 
295
307
func opClientAddServiceUnits(c *C, st *api.State, mst *state.State) (func(), error) {
296
308
        _, err := st.Client().AddServiceUnits("nosuch", 1)
297
309
        if api.ErrCode(err) == api.CodeNotFound {