@@ -206,6 +206,19 @@ func TestAtlasConnectionReconcile(t *testing.T) {
206206 expectedStatus : "False" ,
207207 expectedReason : "InventoryNotFound" ,
208208 },
209+ "InstanceNotReady" : {
210+ createConnection : true ,
211+ configMapCreateFail : false ,
212+ secretCreateFail : false ,
213+ instanceID : "70b7a72f4877d05880cNoSrv" ,
214+ inventoryReason : "SyncOK" ,
215+ inventoryStatus : "True" ,
216+ instancesPath : "../../../test/e2e/data/atlasinventoryconditionsnosrv.json" ,
217+ expectedErrString : "instance connection strings are empty" ,
218+ expectedRequeue : false ,
219+ expectedStatus : "False" ,
220+ expectedReason : "InstanceNotReady" ,
221+ },
209222 "ConfigMapCreateFail" : {
210223 createConnection : true ,
211224 configMapCreateFail : true ,
@@ -251,7 +264,7 @@ func TestAtlasConnectionReconcile(t *testing.T) {
251264 t .Run (tcName , func (t * testing.T ) {
252265 instances := []dbaasv1alpha1.Instance {}
253266 if len (tc .instancesPath ) > 0 {
254- data , err := ioutil .ReadFile ("../../../test/e2e/data/atlasinventoryexpected.json" )
267+ data , err := ioutil .ReadFile (tc . instancesPath )
255268 assert .NoError (t , err )
256269 err = json .Unmarshal (data , & instances )
257270 assert .NoError (t , err )
0 commit comments