@@ -138,10 +138,12 @@ func TestReconcileCreateMissingNetwork(t *testing.T) {
138138 })
139139 assert .NilError (t , err )
140140 assert .Equal (t , plan .String (), `
141- 1. create network testproject_default reason: network does not exist
141+ 1. emit event testproject_default reason: Creating
1421422. emit event testproject-web-1 reason: Creating
143- [1,2] -> 3. create container testproject-web-1 reason: scale up
144- [3] -> 4. emit event testproject-web-1 reason: Created
143+ [1] -> 3. create network testproject_default reason: network does not exist
144+ [3,2] -> 4. create container testproject-web-1 reason: scale up
145+ [3] -> 5. emit event testproject_default reason: Created
146+ [4] -> 6. emit event testproject-web-1 reason: Created
145147` )
146148}
147149
@@ -291,10 +293,12 @@ func TestReconcileCreateMissingVolume(t *testing.T) {
291293 })
292294 assert .NilError (t , err )
293295 assert .Equal (t , plan .String (), `
294- 1. create volume testproject_data reason: volume does not exist
296+ 1. emit event testproject_data reason: Creating
2952972. emit event testproject-web-1 reason: Creating
296- [1,2] -> 3. create container testproject-web-1 reason: scale up
297- [3] -> 4. emit event testproject-web-1 reason: Created
298+ [1] -> 3. create volume testproject_data reason: volume does not exist
299+ [3,2] -> 4. create container testproject-web-1 reason: scale up
300+ [3] -> 5. emit event testproject_data reason: Created
301+ [4] -> 6. emit event testproject-web-1 reason: Created
298302` )
299303}
300304
@@ -1188,11 +1192,15 @@ func TestReconcileContainerCreateDependsOnNetworkAndVolume(t *testing.T) {
11881192 })
11891193 assert .NilError (t , err )
11901194 assert .Equal (t , plan .String (), `
1191- 1. create network testproject_mynet reason: network does not exist
1192- 2. create volume testproject_myvol reason: volume does not exist
1195+ 1. emit event testproject_mynet reason: Creating
1196+ 2. emit event testproject_myvol reason: Creating
119311973. emit event testproject-app-1 reason: Creating
1194- [1,2,3] -> 4. create container testproject-app-1 reason: scale up
1195- [4] -> 5. emit event testproject-app-1 reason: Created
1198+ [1] -> 4. create network testproject_mynet reason: network does not exist
1199+ [2] -> 5. create volume testproject_myvol reason: volume does not exist
1200+ [4] -> 6. emit event testproject_mynet reason: Created
1201+ [4,5,3] -> 7. create container testproject-app-1 reason: scale up
1202+ [5] -> 8. emit event testproject_myvol reason: Created
1203+ [7] -> 9. emit event testproject-app-1 reason: Created
11961204` )
11971205}
11981206
@@ -4332,14 +4340,18 @@ func TestReconcileServiceDependsOnMissingNetworkVolumeAndService(t *testing.T) {
43324340 })
43334341 assert .NilError (t , err )
43344342 assert .Equal (t , plan .String (), `
4335- 1. create network tp_mynet reason: network does not exist
4336- 2. create volume tp_data reason: volume does not exist
4343+ 1. emit event tp_mynet reason: Creating
4344+ 2. emit event tp_data reason: Creating
433743453. emit event tp-db-1 reason: Creating
433843464. emit event tp-web-1 reason: Creating
4339- [3] -> 5. create container tp-db-1 reason: scale up
4340- [5] -> 6. emit event tp-db-1 reason: Created
4341- [1,2,6,4] -> 7. create container tp-web-1 reason: scale up
4342- [7] -> 8. emit event tp-web-1 reason: Created
4347+ [1] -> 5. create network tp_mynet reason: network does not exist
4348+ [2] -> 6. create volume tp_data reason: volume does not exist
4349+ [3] -> 7. create container tp-db-1 reason: scale up
4350+ [5] -> 8. emit event tp_mynet reason: Created
4351+ [6] -> 9. emit event tp_data reason: Created
4352+ [7] -> 10. emit event tp-db-1 reason: Created
4353+ [5,6,10,4] -> 11. create container tp-web-1 reason: scale up
4354+ [11] -> 12. emit event tp-web-1 reason: Created
43434355` )
43444356}
43454357
0 commit comments