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

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/juju/deploy_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:
251
251
func (s *DeployLocalSuite) TestDeployConstraints(c *gc.C) {
252
252
        err := s.State.SetModelConstraints(constraints.MustParse("mem=2G"))
253
253
        c.Assert(err, jc.ErrorIsNil)
254
 
        serviceCons := constraints.MustParse("cpu-cores=2")
 
254
        serviceCons := constraints.MustParse("cores=2")
255
255
        service, err := juju.DeployApplication(s.State,
256
256
                juju.DeployApplicationParams{
257
257
                        ApplicationName: "bob",
265
265
func (s *DeployLocalSuite) TestDeployNumUnits(c *gc.C) {
266
266
        f := &fakeDeployer{State: s.State}
267
267
 
268
 
        serviceCons := constraints.MustParse("cpu-cores=2")
 
268
        serviceCons := constraints.MustParse("cores=2")
269
269
        _, err := juju.DeployApplication(f,
270
270
                juju.DeployApplicationParams{
271
271
                        ApplicationName: "bob",
284
284
func (s *DeployLocalSuite) TestDeployForceMachineId(c *gc.C) {
285
285
        f := &fakeDeployer{State: s.State}
286
286
 
287
 
        serviceCons := constraints.MustParse("cpu-cores=2")
 
287
        serviceCons := constraints.MustParse("cores=2")
288
288
        _, err := juju.DeployApplication(f,
289
289
                juju.DeployApplicationParams{
290
290
                        ApplicationName: "bob",
306
306
func (s *DeployLocalSuite) TestDeployForceMachineIdWithContainer(c *gc.C) {
307
307
        f := &fakeDeployer{State: s.State}
308
308
 
309
 
        serviceCons := constraints.MustParse("cpu-cores=2")
 
309
        serviceCons := constraints.MustParse("cores=2")
310
310
        _, err := juju.DeployApplication(f,
311
311
                juju.DeployApplicationParams{
312
312
                        ApplicationName: "bob",
327
327
func (s *DeployLocalSuite) TestDeploy(c *gc.C) {
328
328
        f := &fakeDeployer{State: s.State}
329
329
 
330
 
        serviceCons := constraints.MustParse("cpu-cores=2")
 
330
        serviceCons := constraints.MustParse("cores=2")
331
331
        placement := []*instance.Placement{
332
332
                {Scope: s.State.ModelUUID(), Directive: "valid"},
333
333
                {Scope: "#", Directive: "0"},
353
353
 
354
354
func (s *DeployLocalSuite) TestDeployWithFewerPlacement(c *gc.C) {
355
355
        f := &fakeDeployer{State: s.State}
356
 
        serviceCons := constraints.MustParse("cpu-cores=2")
 
356
        serviceCons := constraints.MustParse("cores=2")
357
357
        placement := []*instance.Placement{{Scope: s.State.ModelUUID(), Directive: "valid"}}
358
358
        _, err := juju.DeployApplication(f,
359
359
                juju.DeployApplicationParams{