changes for olt reconnect , reboot redesing

Change-Id: I192c01f7672b62956b4b55e19b8cd0d33ca7cfae

fixes for device state handling

Change-Id: I6765b7b53b2c130c70ac37cad28373cec7397908

olt reconnect, reboot redesign changes

Change-Id: I2a4981bc815d0961ffbf7e36ba7cfb06243e8319
diff --git a/internal/pkg/core/device_handler_test.go b/internal/pkg/core/device_handler_test.go
index 8737ee2..4d5d231 100644
--- a/internal/pkg/core/device_handler_test.go
+++ b/internal/pkg/core/device_handler_test.go
@@ -167,8 +167,9 @@
 	cm := &conf.ConfigManager{}
 	cm.Backend = &db.Backend{StoreType: "etcd", Client: &mocks.MockKVClient{}}
 	cfg := &config.AdapterFlags{OmccEncryption: true}
-	openOLT := &OpenOLT{eventProxy: ep, config: cfg}
+	openOLT := &OpenOLT{eventProxy: ep, config: cfg, KVStoreType: "etcd", KVStoreAddress: "1:2"}
 	dh := NewDeviceHandler(cc, ep, device, openOLT, cm, cfg)
+	dh.kvStore = cm.Backend
 	oopRanges := []*oop.DeviceInfo_DeviceResourceRanges{{
 		IntfIds:    []uint32{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15},
 		Technology: "xgs-pon",
@@ -1373,6 +1374,8 @@
 	}
 }
 
+/* We are not using the adapterPreviouslyConnected and agentPreviouslyConnected flags now to check for reboots and reconnects
+commenting out all the tests related to these
 func TestDeviceHandler_TestReconcileStatus(t *testing.T) {
 
 	// olt disconnect (not reboot)
@@ -1431,7 +1434,7 @@
 		})
 	}
 }
-
+*/
 func Test_UpdateFlowsIncrementallyNegativeTestCases(t *testing.T) {
 	dh1 := negativeDeviceHandlerNilFlowMgr()
 	tests := []struct {