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

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/cmd/juju/storage/add_test.go

  • Committer: Martin Packman
  • Date: 2016-03-30 19:31:08 UTC
  • mfrom: (1.1.41)
  • Revision ID: martin.packman@canonical.com-20160330193108-h9iz3ak334uk0z5r
Merge new upstream source 2.0~beta3

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
}
41
41
 
42
42
var errorTsts = []tstData{
43
 
        {nil, ".*storage add requires a unit and a storage directive.*"},
44
 
        {[]string{"tst/123"}, ".*storage add requires a unit and a storage directive.*"},
 
43
        {nil, ".*add-storage requires a unit and a storage directive.*"},
 
44
        {[]string{"tst/123"}, ".*add-storage requires a unit and a storage directive.*"},
45
45
        {[]string{"tst/123", "data="}, `.*storage constraints require at least one.*`},
46
46
        {[]string{"tst/123", "data=-676"}, `.*count must be greater than zero, got "-676".*`},
47
47
        {[]string{"tst/123", "data=676", "data=676"}, `.*storage "data" specified more than once.*`},
61
61
}
62
62
 
63
63
func (s *addSuite) runAdd(c *gc.C, args ...string) (*cmd.Context, error) {
64
 
        return testing.RunCommand(c, storage.NewAddCommand(s.mockAPI, s.store), args...)
 
64
        return testing.RunCommand(c, storage.NewAddCommandForTest(s.mockAPI, s.store), args...)
65
65
}
66
66
 
67
67
func (s *addSuite) TestAddInvalidUnit(c *gc.C) {