@@ -136,18 +136,18 @@ func TestDeviceCollectorNotReady(t *testing.T) {
136136// --- Interface Collector Tests ---
137137
138138func TestInterfaceCollector (t * testing.T ) {
139- mc := newMockConnector ("CONFIG_DB" , "STATE_DB " )
139+ mc := newMockConnector ("CONFIG_DB" , "APPL_DB " )
140140
141141 mc .mocks ["CONFIG_DB" ].ExpectKeys ("PORT|*" ).SetVal ([]string {
142142 "PORT|Ethernet0" , "PORT|Ethernet4" ,
143143 })
144- mc .mocks ["STATE_DB " ].ExpectHGetAll ("PORT_TABLE| Ethernet0" ).SetVal (map [string ]string {
145- "netdev_oper_status" : "up" ,
146- "admin_status" : "up" ,
144+ mc .mocks ["APPL_DB " ].ExpectHGetAll ("PORT_TABLE: Ethernet0" ).SetVal (map [string ]string {
145+ "oper_status" : "up" ,
146+ "admin_status" : "up" ,
147147 })
148- mc .mocks ["STATE_DB " ].ExpectHGetAll ("PORT_TABLE| Ethernet4" ).SetVal (map [string ]string {
149- "netdev_oper_status" : "down" ,
150- "admin_status" : "up" ,
148+ mc .mocks ["APPL_DB " ].ExpectHGetAll ("PORT_TABLE: Ethernet4" ).SetVal (map [string ]string {
149+ "oper_status" : "down" ,
150+ "admin_status" : "up" ,
151151 })
152152
153153 collector := NewInterfaceCollector (mc )
@@ -164,22 +164,22 @@ func TestInterfaceCollector(t *testing.T) {
164164}
165165
166166func TestInterfaceCollectorInterfaceTotals (t * testing.T ) {
167- mc := newMockConnector ("CONFIG_DB" , "STATE_DB " )
167+ mc := newMockConnector ("CONFIG_DB" , "APPL_DB " )
168168
169169 mc .mocks ["CONFIG_DB" ].ExpectKeys ("PORT|*" ).SetVal ([]string {
170170 "PORT|Ethernet0" , "PORT|Ethernet4" , "PORT|Ethernet8" ,
171171 })
172- mc .mocks ["STATE_DB " ].ExpectHGetAll ("PORT_TABLE| Ethernet0" ).SetVal (map [string ]string {
173- "netdev_oper_status" : "up" ,
174- "admin_status" : "up" ,
172+ mc .mocks ["APPL_DB " ].ExpectHGetAll ("PORT_TABLE: Ethernet0" ).SetVal (map [string ]string {
173+ "oper_status" : "up" ,
174+ "admin_status" : "up" ,
175175 })
176- mc .mocks ["STATE_DB " ].ExpectHGetAll ("PORT_TABLE| Ethernet4" ).SetVal (map [string ]string {
177- "netdev_oper_status" : "up" ,
178- "admin_status" : "up" ,
176+ mc .mocks ["APPL_DB " ].ExpectHGetAll ("PORT_TABLE: Ethernet4" ).SetVal (map [string ]string {
177+ "oper_status" : "up" ,
178+ "admin_status" : "up" ,
179179 })
180- mc .mocks ["STATE_DB " ].ExpectHGetAll ("PORT_TABLE| Ethernet8" ).SetVal (map [string ]string {
181- "netdev_oper_status" : "down" ,
182- "admin_status" : "down" ,
180+ mc .mocks ["APPL_DB " ].ExpectHGetAll ("PORT_TABLE: Ethernet8" ).SetVal (map [string ]string {
181+ "oper_status" : "down" ,
182+ "admin_status" : "down" ,
183183 })
184184
185185 collector := NewInterfaceCollector (mc )
@@ -1233,18 +1233,18 @@ func TestConfigValidationRegexInvalidPattern(t *testing.T) {
12331233// --- Interface Collector Per-Interface State Tests ---
12341234
12351235func TestInterfaceCollectorPerInterfaceState (t * testing.T ) {
1236- mc := newMockConnector ("CONFIG_DB" , "STATE_DB " )
1236+ mc := newMockConnector ("CONFIG_DB" , "APPL_DB " )
12371237
12381238 mc .mocks ["CONFIG_DB" ].ExpectKeys ("PORT|*" ).SetVal ([]string {
12391239 "PORT|Ethernet0" , "PORT|Ethernet4" ,
12401240 })
1241- mc .mocks ["STATE_DB " ].ExpectHGetAll ("PORT_TABLE| Ethernet0" ).SetVal (map [string ]string {
1242- "netdev_oper_status" : "up" ,
1243- "admin_status" : "up" ,
1241+ mc .mocks ["APPL_DB " ].ExpectHGetAll ("PORT_TABLE: Ethernet0" ).SetVal (map [string ]string {
1242+ "oper_status" : "up" ,
1243+ "admin_status" : "up" ,
12441244 })
1245- mc .mocks ["STATE_DB " ].ExpectHGetAll ("PORT_TABLE| Ethernet4" ).SetVal (map [string ]string {
1246- "netdev_oper_status" : "down" ,
1247- "admin_status" : "up" ,
1245+ mc .mocks ["APPL_DB " ].ExpectHGetAll ("PORT_TABLE: Ethernet4" ).SetVal (map [string ]string {
1246+ "oper_status" : "down" ,
1247+ "admin_status" : "up" ,
12481248 })
12491249
12501250 collector := NewInterfaceCollector (mc )
0 commit comments