~juju-qa/ubuntu/xenial/juju/2.0-rc2

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/cmd/juju/user/export_test.go

  • Committer: Nicholas Skaggs
  • Date: 2016-09-30 14:39:30 UTC
  • mfrom: (1.8.1)
  • Revision ID: nicholas.skaggs@canonical.com-20160930143930-vwwhrefh6ftckccy
import upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 
6
6
import (
7
7
        "github.com/juju/cmd"
 
8
        "github.com/juju/utils/clock"
8
9
 
9
10
        "github.com/juju/juju/api"
10
11
        "github.com/juju/juju/cmd/modelcmd"
50
51
}
51
52
 
52
53
func NewShowUserCommandForTest(api UserInfoAPI, store jujuclient.ClientStore) cmd.Command {
53
 
        cmd := &infoCommand{infoCommandBase: infoCommandBase{api: api}}
 
54
        cmd := &infoCommand{infoCommandBase: infoCommandBase{
 
55
                clock: clock.WallClock,
 
56
                api:   api}}
54
57
        cmd.SetClientStore(store)
55
58
        return modelcmd.WrapController(cmd)
56
59
}
106
109
}
107
110
 
108
111
// NewListCommand returns a ListCommand with the api provided as specified.
109
 
func NewListCommandForTest(api UserInfoAPI, store jujuclient.ClientStore) cmd.Command {
110
 
        c := &listCommand{infoCommandBase: infoCommandBase{api: api}}
 
112
func NewListCommandForTest(api UserInfoAPI, modelAPI modelUsersAPI, store jujuclient.ClientStore, clock clock.Clock) cmd.Command {
 
113
        c := &listCommand{
 
114
                infoCommandBase: infoCommandBase{
 
115
                        clock: clock,
 
116
                        api:   api,
 
117
                },
 
118
                modelUserAPI: modelAPI,
 
119
        }
111
120
        c.SetClientStore(store)
112
121
        return modelcmd.WrapController(c)
113
122
}