~wallyworld/juju-core/fast-lxc-everywhere

« back to all changes in this revision

Viewing changes to provider/ec2/image_test.go

  • Committer: Tarmac
  • Author(s): William Reade
  • Date: 2014-04-25 07:54:39 UTC
  • mfrom: (2678.3.2 juju-core)
  • Revision ID: tarmac-20140425075439-idd74399w5p9bdeh
[r=fwereade] provider/ec2: update instance types/costs

They were pretty badly out of date, and the costs weren't all consistent.
And one of them had a cpu-power off by a factor of 10.

https://codereview.appspot.com/96790043/

Show diffs side-by-side

added added

removed removed

Lines of Context:
119
119
                series: "quantal",
120
120
                arches: both,
121
121
                cons:   "arch=amd64",
122
 
                itype:  "cc1.4xlarge",
 
122
                itype:  "cc2.8xlarge",
123
123
                image:  "ami-01000035",
124
124
        }, {
125
125
                series: "quantal",
126
126
                arches: both,
127
 
                cons:   "instance-type=cc1.4xlarge",
128
 
                itype:  "cc1.4xlarge",
 
127
                cons:   "instance-type=cc2.8xlarge",
 
128
                itype:  "cc2.8xlarge",
129
129
                image:  "ami-01000035",
130
130
        }, {
131
131
                series: "precise",
137
137
}
138
138
 
139
139
func (s *specSuite) TestFindInstanceSpec(c *gc.C) {
140
 
        for i, t := range findInstanceSpecTests {
141
 
                c.Logf("test %d", i)
 
140
        for i, test := range findInstanceSpecTests {
 
141
                c.Logf("\ntest %d: %q; %q; %q", i, test.series, test.arches, test.cons)
142
142
                stor := ebsStorage
143
143
                spec, err := findInstanceSpec(
144
144
                        []simplestreams.DataSource{
146
146
                        "released",
147
147
                        &instances.InstanceConstraint{
148
148
                                Region:      "test",
149
 
                                Series:      t.series,
150
 
                                Arches:      t.arches,
151
 
                                Constraints: constraints.MustParse(t.cons),
 
149
                                Series:      test.series,
 
150
                                Arches:      test.arches,
 
151
                                Constraints: constraints.MustParse(test.cons),
152
152
                                Storage:     &stor,
153
153
                        })
154
154
                c.Assert(err, gc.IsNil)
155
 
                c.Check(spec.InstanceType.Name, gc.Equals, t.itype)
156
 
                c.Check(spec.Image.Id, gc.Equals, t.image)
 
155
                c.Check(spec.InstanceType.Name, gc.Equals, test.itype)
 
156
                c.Check(spec.Image.Id, gc.Equals, test.image)
157
157
        }
158
158
}
159
159
 
175
175
                series: "raring",
176
176
                arches: both,
177
177
                cons:   "mem=4G",
178
 
                err:    `no "raring" images in test matching instance types \[m1.large m1.xlarge c1.xlarge cc1.4xlarge cc2.8xlarge\]`,
 
178
                err:    `no "raring" images in test matching instance types \[m1.large m1.xlarge c1.xlarge cc2.8xlarge\]`,
179
179
        },
180
180
}
181
181