OLD | NEW |
1 // Copyright 2012, 2013 Canonical Ltd. | 1 // Copyright 2012, 2013 Canonical Ltd. |
2 // Licensed under the AGPLv3, see LICENCE file for details. | 2 // Licensed under the AGPLv3, see LICENCE file for details. |
3 | 3 |
4 package main | 4 package main |
5 | 5 |
6 import ( | 6 import ( |
7 "strings" | 7 "strings" |
8 | 8 |
| 9 "github.com/juju/errors" |
9 jc "github.com/juju/testing/checkers" | 10 jc "github.com/juju/testing/checkers" |
10 gc "launchpad.net/gocheck" | 11 gc "launchpad.net/gocheck" |
11 | 12 |
12 "launchpad.net/juju-core/charm" | 13 "launchpad.net/juju-core/charm" |
13 "launchpad.net/juju-core/cmd/envcmd" | 14 "launchpad.net/juju-core/cmd/envcmd" |
14 "launchpad.net/juju-core/constraints" | 15 "launchpad.net/juju-core/constraints" |
15 "launchpad.net/juju-core/errors" | |
16 "launchpad.net/juju-core/instance" | 16 "launchpad.net/juju-core/instance" |
17 "launchpad.net/juju-core/juju/osenv" | 17 "launchpad.net/juju-core/juju/osenv" |
18 "launchpad.net/juju-core/juju/testing" | 18 "launchpad.net/juju-core/juju/testing" |
19 "launchpad.net/juju-core/state" | 19 "launchpad.net/juju-core/state" |
20 coretesting "launchpad.net/juju-core/testing" | 20 coretesting "launchpad.net/juju-core/testing" |
21 ) | 21 ) |
22 | 22 |
23 type DeploySuite struct { | 23 type DeploySuite struct { |
24 testing.RepoSuite | 24 testing.RepoSuite |
25 } | 25 } |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 | 262 |
263 func (s *DeploySuite) TestForceMachineSubordinate(c *gc.C) { | 263 func (s *DeploySuite) TestForceMachineSubordinate(c *gc.C) { |
264 machine, err := s.State.AddMachine("precise", state.JobHostUnits) | 264 machine, err := s.State.AddMachine("precise", state.JobHostUnits) |
265 c.Assert(err, gc.IsNil) | 265 c.Assert(err, gc.IsNil) |
266 coretesting.Charms.BundlePath(s.SeriesPath, "logging") | 266 coretesting.Charms.BundlePath(s.SeriesPath, "logging") |
267 err = runDeploy(c, "--to", machine.Id(), "local:logging") | 267 err = runDeploy(c, "--to", machine.Id(), "local:logging") |
268 c.Assert(err, gc.ErrorMatches, "cannot use --num-units or --to with subo
rdinate service") | 268 c.Assert(err, gc.ErrorMatches, "cannot use --num-units or --to with subo
rdinate service") |
269 _, err = s.State.Service("dummy") | 269 _, err = s.State.Service("dummy") |
270 c.Assert(err, gc.ErrorMatches, `service "dummy" not found`) | 270 c.Assert(err, gc.ErrorMatches, `service "dummy" not found`) |
271 } | 271 } |
OLD | NEW |