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

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/provider/lxd/environ_policy_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:
108
108
                "tags=foo",
109
109
                "mem=3",
110
110
                "instance-type=some-type",
111
 
                "cpu-cores=2",
 
111
                "cores=2",
112
112
                "cpu-power=250",
113
113
                "virt-type=kvm",
114
114
        }, " "))
118
118
        expected := []string{
119
119
                "tags",
120
120
                "instance-type",
121
 
                "cpu-cores",
 
121
                "cores",
122
122
                "cpu-power",
123
123
                "virt-type",
124
124
        }
167
167
        c.Assert(err, jc.ErrorIsNil)
168
168
 
169
169
        cons := constraints.MustParse("instance-type=n1-standard-1")
170
 
        consFallback := constraints.MustParse("cpu-cores=2 cpu-power=1000 mem=10000 tags=bar")
 
170
        consFallback := constraints.MustParse("cores=2 cpu-power=1000 mem=10000 tags=bar")
171
171
        merged, err := validator.Merge(consFallback, cons)
172
172
        c.Assert(err, jc.ErrorIsNil)
173
173
 
174
174
        // tags is not supported, but we're not validating here...
175
 
        expected := constraints.MustParse("instance-type=n1-standard-1 tags=bar cpu-cores=2 cpu-power=1000 mem=10000")
 
175
        expected := constraints.MustParse("instance-type=n1-standard-1 tags=bar cores=2 cpu-power=1000 mem=10000")
176
176
        c.Check(merged, jc.DeepEquals, expected)
177
177
}
178
178