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

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

Issue 90130044: Implements "juju actions <service>".
Patch Set: Created 10 years, 11 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
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, &params.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",
+ },
+ },
+ },
+ },
+ })
+}

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