File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -321,7 +321,11 @@ func flattenZoneAssignment(list []*models.ZoneAssignment) []map[string]interface
321
321
}
322
322
323
323
func expandProjectConstraints (configProjectConstraints []interface {}) map [string ][]models.Constraint {
324
- projectConstraints := make (map [string ][]models.Constraint )
324
+ projectConstraints := map [string ][]models.Constraint {
325
+ "extensibility" : {},
326
+ "network" : {},
327
+ "storage" : {},
328
+ }
325
329
326
330
for _ , configProjectConstraint := range configProjectConstraints {
327
331
configConstraints := configProjectConstraint .(map [string ]interface {})
Original file line number Diff line number Diff line change @@ -24,8 +24,14 @@ func TestExpandProjectConstraints(t *testing.T) {
24
24
projectConstraints := make ([]interface {}, 0 )
25
25
expandedConstraints := expandProjectConstraints (projectConstraints )
26
26
27
- if len (expandedConstraints ) != 0 {
28
- t .Errorf ("error while expanding when there are no project constraints" )
27
+ if len (expandedConstraints ["extensibility" ]) != 0 {
28
+ t .Errorf ("error while expanding when there are no project extensibility constraints" )
29
+ }
30
+ if len (expandedConstraints ["network" ]) != 0 {
31
+ t .Errorf ("error while expanding when there are no project network constraints" )
32
+ }
33
+ if len (expandedConstraints ["storage" ]) != 0 {
34
+ t .Errorf ("error while expanding when there are no project storage constraints" )
29
35
}
30
36
31
37
constraints := make ([]interface {}, 0 )
You can’t perform that action at this time.
0 commit comments