Skip to content

Commit

Permalink
Fixed PSU UTs.
Browse files Browse the repository at this point in the history
Signed-off-by: Nazarii Hnydyn <nazariig@mellanox.com>
  • Loading branch information
nazariig committed Mar 25, 2019
1 parent 4706551 commit bbbc878
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 103 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import imp
import re
import sys

from enum import Enum, unique
from sonic_ax_impl import mibs
from ax_interface import MIBMeta, ValueType, MIBUpdater, MIBEntry, SubtreeMIBEntry
from ax_interface.encodings import ObjectIdentifier
from ax_interface import MIBMeta, ValueType, SubtreeMIBEntry
from swsssdk import SonicV2Connector

CHASSIS_INFO_KEY_TEMPLATE = 'chassis {}'
Expand Down
1 change: 0 additions & 1 deletion tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
import tests.mock_tables.imp
15 changes: 0 additions & 15 deletions tests/mock_tables/imp.py

This file was deleted.

53 changes: 34 additions & 19 deletions tests/mock_tables/state_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,43 @@
"DEVICE_METADATA|localhost": {
"chassis_serial_number": "SAMPLETESTSN"
},
"PSU_INFO|PSU 1": {
"presence": "false",
"status": "false"
},
"PSU_INFO|PSU 2": {
"presence": "true",
"status": "true"
},
"PSU_INFO|PSU 3": {
"presence": "true",
"status": "false"
},
"CHASSIS_INFO|chassis 1": {
"psu_num": "3"
},
"TRANSCEIVER_INFO|Ethernet0": {
"type": "QSFP+",
"hardwarerev" : "A1",
"serialnum": "SERIAL_NUM",
"manufacturename": "VENDOR_NAME",
"modelname": "MODEL_NAME"
"type": "QSFP+",
"hardwarerev" : "A1",
"serialnum": "SERIAL_NUM",
"manufacturename": "VENDOR_NAME",
"modelname": "MODEL_NAME"
},
"TRANSCEIVER_DOM_SENSOR|Ethernet0": {
"temperature": 25.39,
"voltage": 3.37,
"tx1bias": "N/A",
"tx2bias": 4.44,
"tx3bias": "inf",
"tx4bias": 4.44,
"rx1power": "-inf",
"rx2power": -0.97,
"rx3power": -0.97,
"rx4power": -0.97,
"tx1power": -5.4,
"tx2power": -5.4,
"tx3power": -5.4,
"tx4power": -5.4
"temperature": 25.39,
"voltage": 3.37,
"tx1bias": "N/A",
"tx2bias": 4.44,
"tx3bias": "inf",
"tx4bias": 4.44,
"rx1power": "-inf",
"rx2power": -0.97,
"rx3power": -0.97,
"rx4power": -0.97,
"tx1power": -5.4,
"tx2power": -5.4,
"tx3power": -5.4,
"tx4power": -5.4
},
"MGMT_PORT_TABLE|eth0": {
"oper_status": "down"
Expand Down
62 changes: 0 additions & 62 deletions tests/plugins/psuutil.py

This file was deleted.

0 comments on commit bbbc878

Please sign in to comment.