Skip to content

Commit 2d147b8

Browse files
committed
Add options object to all route jsons in tests
1 parent d017f70 commit 2d147b8

File tree

2 files changed

+22
-15
lines changed

2 files changed

+22
-15
lines changed

lib/cloud_controller/app_manifest/manifest_route.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,8 @@ def self.parse(route, options=nil)
1616
end
1717

1818
attrs[:full_route] = route
19-
20-
if options
21-
attrs[:options] = {}
22-
attrs[:options][:lb_algo] = options[:'loadbalancing-algorithm'] if options.key?(:'loadbalancing-algorithm')
23-
end
19+
attrs[:options] = {}
20+
attrs[:options][:lb_algo] = options[:'loadbalancing-algorithm'] if options && options.key?(:'loadbalancing-algorithm')
2421

2522
ManifestRoute.new(attrs)
2623
end

spec/request/routes_spec.rb

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,7 +1221,8 @@
12211221
metadata: {
12221222
labels: {},
12231223
annotations: {}
1224-
}
1224+
},
1225+
options: {}
12251226
}
12261227
end
12271228

@@ -1267,7 +1268,8 @@
12671268
metadata: {
12681269
labels: { potato: 'yam' },
12691270
annotations: { style: 'mashed' }
1270-
}
1271+
},
1272+
options: {}
12711273
}
12721274
end
12731275

@@ -1299,7 +1301,8 @@
12991301
metadata: {
13001302
labels: { potato: 'yam' },
13011303
annotations: { style: 'mashed' }
1302-
}
1304+
},
1305+
options: {}
13031306
}
13041307
end
13051308

@@ -1384,7 +1387,8 @@
13841387
metadata: {
13851388
labels: {},
13861389
annotations: {}
1387-
}
1390+
},
1391+
options: {}
13881392
}
13891393
end
13901394

@@ -1482,7 +1486,8 @@
14821486
metadata: {
14831487
labels: {},
14841488
annotations: {}
1485-
}
1489+
},
1490+
options: {}
14861491
}
14871492
end
14881493

@@ -1555,7 +1560,8 @@
15551560
metadata: {
15561561
labels: {},
15571562
annotations: {}
1558-
}
1563+
},
1564+
options: {}
15591565
}
15601566
end
15611567

@@ -1642,7 +1648,8 @@
16421648
metadata: {
16431649
labels: {},
16441650
annotations: {}
1645-
}
1651+
},
1652+
options: {}
16461653
}
16471654
end
16481655

@@ -1782,7 +1789,8 @@
17821789
space: { href: %r{#{Regexp.escape(link_prefix)}/v3/spaces/#{space.guid}} },
17831790
destinations: { href: %r{#{Regexp.escape(link_prefix)}/v3/routes/#{UUID_REGEX}/destinations} },
17841791
domain: { href: %r{#{Regexp.escape(link_prefix)}/v3/domains/#{domain.guid}} }
1785-
}
1792+
},
1793+
options: {}
17861794
}
17871795
end
17881796

@@ -1894,7 +1902,8 @@
18941902
metadata: {
18951903
labels: {},
18961904
annotations: {}
1897-
}
1905+
},
1906+
options: {}
18981907
}
18991908
end
19001909

@@ -2127,7 +2136,8 @@
21272136
space: { href: %r{#{Regexp.escape(link_prefix)}/v3/spaces/#{space.guid}} },
21282137
destinations: { href: %r{#{Regexp.escape(link_prefix)}/v3/routes/#{UUID_REGEX}/destinations} },
21292138
domain: { href: %r{#{Regexp.escape(link_prefix)}/v3/domains/#{domain.guid}} }
2130-
}
2139+
},
2140+
options: {}
21312141
}
21322142
end
21332143

0 commit comments

Comments
 (0)