@@ -64,7 +64,7 @@ var _ = Describe("AddRoutableToActualLrps", func() {
6464 Expect (routable ).To (BeTrue ())
6565 })
6666
67- It ("sets routable false for all existing actual_lrp rows" , func () {
67+ It ("sets routable true for all existing actual_lrp rows in RUNNING state " , func () {
6868 _ , err := rawSQLDB .Exec (
6969 helpers .RebindForFlavor (
7070 `INSERT INTO actual_lrps
@@ -79,6 +79,28 @@ var _ = Describe("AddRoutableToActualLrps", func() {
7979
8080 Expect (migration .Up (logger )).To (Succeed ())
8181
82+ var routable bool
83+ query := helpers .RebindForFlavor ("select routable from actual_lrps limit 1" , flavor )
84+ row := rawSQLDB .QueryRow (query )
85+ Expect (row .Scan (& routable )).To (Succeed ())
86+ Expect (routable ).To (BeTrue ())
87+ })
88+
89+ It ("sets routable false for all existing actual_lrp rows not in RUNNING state" , func () {
90+ _ , err := rawSQLDB .Exec (
91+ helpers .RebindForFlavor (
92+ `INSERT INTO actual_lrps
93+ (process_guid, instance_index, domain, state, net_info,
94+ modification_tag_epoch, modification_tag_index)
95+ VALUES (?, ?, ?, ?, ?, ?, ?)` ,
96+ flavor ,
97+ ),
98+ "guid-1" , 10 , "cfapps" , "CLAIMED" , "" , "epoch" , 0 ,
99+ )
100+ Expect (err ).NotTo (HaveOccurred ())
101+
102+ Expect (migration .Up (logger )).To (Succeed ())
103+
82104 var routable bool
83105 query := helpers .RebindForFlavor ("select routable from actual_lrps limit 1" , flavor )
84106 row := rawSQLDB .QueryRow (query )
0 commit comments