1
// Copyright 2015 Canonical Ltd.
2
// Licensed under the AGPLv3, see LICENCE file for details.
9
"github.com/juju/juju/cmd/modelcmd"
10
"github.com/juju/juju/jujuclient"
14
ConvertToVolumeInfo = convertToVolumeInfo
15
ConvertToFilesystemInfo = convertToFilesystemInfo
18
func NewPoolListCommandForTest(api PoolListAPI, store jujuclient.ClientStore) cmd.Command {
19
cmd := &poolListCommand{newAPIFunc: func() (PoolListAPI, error) {
22
cmd.SetClientStore(store)
23
return modelcmd.Wrap(cmd)
26
func NewPoolCreateCommandForTest(api PoolCreateAPI, store jujuclient.ClientStore) cmd.Command {
27
cmd := &poolCreateCommand{newAPIFunc: func() (PoolCreateAPI, error) {
30
cmd.SetClientStore(store)
31
return modelcmd.Wrap(cmd)
34
func NewShowCommandForTest(api StorageShowAPI, store jujuclient.ClientStore) cmd.Command {
35
cmd := &showCommand{newAPIFunc: func() (StorageShowAPI, error) {
38
cmd.SetClientStore(store)
39
return modelcmd.Wrap(cmd)
42
func NewListCommandForTest(api StorageListAPI, store jujuclient.ClientStore) cmd.Command {
43
cmd := &listCommand{newAPIFunc: func() (StorageListAPI, error) {
46
cmd.SetClientStore(store)
47
return modelcmd.Wrap(cmd)
50
func NewAddCommandForTest(api StorageAddAPI, store jujuclient.ClientStore) cmd.Command {
51
cmd := &addCommand{newAPIFunc: func() (StorageAddAPI, error) {
54
cmd.SetClientStore(store)
55
return modelcmd.Wrap(cmd)