Index: state/apiserver/client/actions_test.go |
=== added file 'state/apiserver/client/actions_test.go' |
--- state/apiserver/client/actions_test.go 1970-01-01 00:00:00 +0000 |
+++ state/apiserver/client/actions_test.go 2014-04-21 21:05:37 +0000 |
@@ -0,0 +1,38 @@ |
+// Copyright 2012, 2013 Canonical Ltd. |
+// Licensed under the AGPLv3, see LICENCE file for details. |
+ |
+package client_test |
+ |
+import ( |
+ gc "launchpad.net/gocheck" |
+ "launchpad.net/juju-core/state/api/params" |
+) |
+ |
+type actionsSuite struct { |
+ baseSuite |
+} |
+ |
+var _ = gc.Suite(&actionsSuite{}) |
+ |
+func (s *actionsSuite) TestClientServiceActionsSmoketest(c *gc.C) { |
+ s.setUpScenario(c) |
+ s.AddTestingService(c, "actions-service", s.AddTestingCharm(c, "dummy")) |
+ results, err := s.APIState.Client().ServiceActions("actions-service") |
+ c.Assert(err, gc.IsNil) |
+ c.Assert(results, gc.DeepEquals, ¶ms.ServiceActionsResults{ |
+ ServiceName: "actions-service", |
+ Charm: "dummy", |
+ ActionsSpec: map[string]interface{}{ |
+ "snapshot": map[string]interface{}{ |
+ "description": "Take a snapshot of the database.", |
+ "params": map[string]interface{}{ |
+ "outfile": map[string]interface{}{ |
+ "description": "The file to write out to.", |
+ "type": "string", |
+ "default": "foo.bz2", |
+ }, |
+ }, |
+ }, |
+ }, |
+ }) |
+} |