1
// Copyright 2016 Canonical Ltd.
2
// Licensed under the AGPLv3, see LICENCE file for details.
10
jujucmd "github.com/juju/cmd"
11
"github.com/juju/cmd/cmdtesting"
12
"github.com/juju/testing"
13
jc "github.com/juju/testing/checkers"
15
"github.com/juju/romulus/cmd"
18
func TestPackage(t *stdtesting.T) {
22
type httpSuite struct {
27
var _ = gc.Suite(&httpSuite{})
29
type testCommand struct {
33
func (c *testCommand) Info() *jujucmd.Info {
34
return &jujucmd.Info{Name: "test"}
37
func (c *testCommand) Run(ctx *jujucmd.Context) error {
41
func (s *httpSuite) TestNewClient(c *gc.C) {
42
basecmd := &testCommand{}
45
_, err := cmdtesting.RunCommand(c, basecmd)
46
c.Assert(err, jc.ErrorIsNil)
48
client, err := basecmd.NewClient()
49
c.Assert(err, jc.ErrorIsNil)
50
c.Assert(client, gc.NotNil)