LEFT | RIGHT |
(no file at all) | |
1 // Copyright 2011, 2012, 2013 Canonical Ltd. | 1 // Copyright 2011, 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 ec2 | 4 package ec2 |
5 | 5 |
6 import ( | 6 import ( |
7 . "launchpad.net/gocheck" | 7 . "launchpad.net/gocheck" |
8 "launchpad.net/juju-core/constraints" | 8 "launchpad.net/juju-core/constraints" |
9 "launchpad.net/juju-core/environs/instances" | 9 "launchpad.net/juju-core/environs/instances" |
10 "launchpad.net/juju-core/testing" | 10 "launchpad.net/juju-core/testing" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 c.Logf("test %d", i) | 125 c.Logf("test %d", i) |
126 storage := ebsStorage | 126 storage := ebsStorage |
127 spec, err := findInstanceSpec([]string{"test:"}, &instances.Inst
anceConstraint{ | 127 spec, err := findInstanceSpec([]string{"test:"}, &instances.Inst
anceConstraint{ |
128 Region: "test", | 128 Region: "test", |
129 Series: t.series, | 129 Series: t.series, |
130 Arches: t.arches, | 130 Arches: t.arches, |
131 Constraints: constraints.MustParse(t.cons), | 131 Constraints: constraints.MustParse(t.cons), |
132 Storage: &storage, | 132 Storage: &storage, |
133 }) | 133 }) |
134 c.Assert(err, IsNil) | 134 c.Assert(err, IsNil) |
135 » » c.Check(spec.InstanceTypeName, Equals, t.itype) | 135 » » c.Check(spec.InstanceType.Name, Equals, t.itype) |
136 c.Check(spec.Image.Id, Equals, t.image) | 136 c.Check(spec.Image.Id, Equals, t.image) |
137 } | 137 } |
138 } | 138 } |
139 | 139 |
140 var findInstanceSpecErrorTests = []struct { | 140 var findInstanceSpecErrorTests = []struct { |
141 series string | 141 series string |
142 arches []string | 142 arches []string |
143 cons string | 143 cons string |
144 err string | 144 err string |
145 }{ | 145 }{ |
(...skipping 18 matching lines...) Expand all Loading... |
164 c.Logf("test %d", i) | 164 c.Logf("test %d", i) |
165 _, err := findInstanceSpec([]string{"test:"}, &instances.Instanc
eConstraint{ | 165 _, err := findInstanceSpec([]string{"test:"}, &instances.Instanc
eConstraint{ |
166 Region: "test", | 166 Region: "test", |
167 Series: t.series, | 167 Series: t.series, |
168 Arches: t.arches, | 168 Arches: t.arches, |
169 Constraints: constraints.MustParse(t.cons), | 169 Constraints: constraints.MustParse(t.cons), |
170 }) | 170 }) |
171 c.Check(err, ErrorMatches, t.err) | 171 c.Check(err, ErrorMatches, t.err) |
172 } | 172 } |
173 } | 173 } |
LEFT | RIGHT |