|
|
@ -77,7 +77,7 @@ func TestSmart_Flatten_ATA(t *testing.T) {
|
|
|
|
"attr.1.failure_rate": float64(0),
|
|
|
|
"attr.1.failure_rate": float64(0),
|
|
|
|
"attr.1.raw_string": "0",
|
|
|
|
"attr.1.raw_string": "0",
|
|
|
|
"attr.1.raw_value": int64(0),
|
|
|
|
"attr.1.raw_value": int64(0),
|
|
|
|
"attr.1.status": pkg.AttributeStatus(0),
|
|
|
|
"attr.1.status": int64(0),
|
|
|
|
"attr.1.status_reason": "",
|
|
|
|
"attr.1.status_reason": "",
|
|
|
|
"attr.1.thresh": int64(1),
|
|
|
|
"attr.1.thresh": int64(1),
|
|
|
|
"attr.1.transformed_value": int64(0),
|
|
|
|
"attr.1.transformed_value": int64(0),
|
|
|
@ -89,7 +89,7 @@ func TestSmart_Flatten_ATA(t *testing.T) {
|
|
|
|
"attr.2.failure_rate": float64(0),
|
|
|
|
"attr.2.failure_rate": float64(0),
|
|
|
|
"attr.2.raw_string": "108",
|
|
|
|
"attr.2.raw_string": "108",
|
|
|
|
"attr.2.raw_value": int64(108),
|
|
|
|
"attr.2.raw_value": int64(108),
|
|
|
|
"attr.2.status": pkg.AttributeStatus(0),
|
|
|
|
"attr.2.status": int64(0),
|
|
|
|
"attr.2.status_reason": "",
|
|
|
|
"attr.2.status_reason": "",
|
|
|
|
"attr.2.thresh": int64(54),
|
|
|
|
"attr.2.thresh": int64(54),
|
|
|
|
"attr.2.transformed_value": int64(0),
|
|
|
|
"attr.2.transformed_value": int64(0),
|
|
|
@ -130,7 +130,7 @@ func TestSmart_Flatten_SCSI(t *testing.T) {
|
|
|
|
require.Equal(t, map[string]interface{}{
|
|
|
|
require.Equal(t, map[string]interface{}{
|
|
|
|
"attr.read_errors_corrected_by_eccfast.attribute_id": "read_errors_corrected_by_eccfast",
|
|
|
|
"attr.read_errors_corrected_by_eccfast.attribute_id": "read_errors_corrected_by_eccfast",
|
|
|
|
"attr.read_errors_corrected_by_eccfast.failure_rate": float64(0),
|
|
|
|
"attr.read_errors_corrected_by_eccfast.failure_rate": float64(0),
|
|
|
|
"attr.read_errors_corrected_by_eccfast.status": pkg.AttributeStatus(0),
|
|
|
|
"attr.read_errors_corrected_by_eccfast.status": int64(0),
|
|
|
|
"attr.read_errors_corrected_by_eccfast.status_reason": "",
|
|
|
|
"attr.read_errors_corrected_by_eccfast.status_reason": "",
|
|
|
|
"attr.read_errors_corrected_by_eccfast.thresh": int64(0),
|
|
|
|
"attr.read_errors_corrected_by_eccfast.thresh": int64(0),
|
|
|
|
"attr.read_errors_corrected_by_eccfast.transformed_value": int64(0),
|
|
|
|
"attr.read_errors_corrected_by_eccfast.transformed_value": int64(0),
|
|
|
@ -168,7 +168,7 @@ func TestSmart_Flatten_NVMe(t *testing.T) {
|
|
|
|
require.Equal(t, map[string]interface{}{
|
|
|
|
require.Equal(t, map[string]interface{}{
|
|
|
|
"attr.available_spare.attribute_id": "available_spare",
|
|
|
|
"attr.available_spare.attribute_id": "available_spare",
|
|
|
|
"attr.available_spare.failure_rate": float64(0),
|
|
|
|
"attr.available_spare.failure_rate": float64(0),
|
|
|
|
"attr.available_spare.status": pkg.AttributeStatus(0),
|
|
|
|
"attr.available_spare.status": int64(0),
|
|
|
|
"attr.available_spare.status_reason": "",
|
|
|
|
"attr.available_spare.status_reason": "",
|
|
|
|
"attr.available_spare.thresh": int64(0),
|
|
|
|
"attr.available_spare.thresh": int64(0),
|
|
|
|
"attr.available_spare.transformed_value": int64(0),
|
|
|
|
"attr.available_spare.transformed_value": int64(0),
|
|
|
@ -189,7 +189,7 @@ func TestNewSmartFromInfluxDB_ATA(t *testing.T) {
|
|
|
|
"attr.1.failure_rate": float64(0),
|
|
|
|
"attr.1.failure_rate": float64(0),
|
|
|
|
"attr.1.raw_string": "108",
|
|
|
|
"attr.1.raw_string": "108",
|
|
|
|
"attr.1.raw_value": int64(108),
|
|
|
|
"attr.1.raw_value": int64(108),
|
|
|
|
"attr.1.status": pkg.AttributeStatus(0),
|
|
|
|
"attr.1.status": int64(0),
|
|
|
|
"attr.1.status_reason": "",
|
|
|
|
"attr.1.status_reason": "",
|
|
|
|
"attr.1.thresh": int64(54),
|
|
|
|
"attr.1.thresh": int64(54),
|
|
|
|
"attr.1.transformed_value": int64(0),
|
|
|
|
"attr.1.transformed_value": int64(0),
|
|
|
@ -235,7 +235,7 @@ func TestNewSmartFromInfluxDB_NVMe(t *testing.T) {
|
|
|
|
"device_protocol": pkg.DeviceProtocolNvme,
|
|
|
|
"device_protocol": pkg.DeviceProtocolNvme,
|
|
|
|
"attr.available_spare.attribute_id": "available_spare",
|
|
|
|
"attr.available_spare.attribute_id": "available_spare",
|
|
|
|
"attr.available_spare.failure_rate": float64(0),
|
|
|
|
"attr.available_spare.failure_rate": float64(0),
|
|
|
|
"attr.available_spare.status": pkg.AttributeStatus(0),
|
|
|
|
"attr.available_spare.status": int64(0),
|
|
|
|
"attr.available_spare.status_reason": "",
|
|
|
|
"attr.available_spare.status_reason": "",
|
|
|
|
"attr.available_spare.thresh": int64(0),
|
|
|
|
"attr.available_spare.thresh": int64(0),
|
|
|
|
"attr.available_spare.transformed_value": int64(0),
|
|
|
|
"attr.available_spare.transformed_value": int64(0),
|
|
|
@ -274,7 +274,7 @@ func TestNewSmartFromInfluxDB_SCSI(t *testing.T) {
|
|
|
|
"device_protocol": pkg.DeviceProtocolScsi,
|
|
|
|
"device_protocol": pkg.DeviceProtocolScsi,
|
|
|
|
"attr.read_errors_corrected_by_eccfast.attribute_id": "read_errors_corrected_by_eccfast",
|
|
|
|
"attr.read_errors_corrected_by_eccfast.attribute_id": "read_errors_corrected_by_eccfast",
|
|
|
|
"attr.read_errors_corrected_by_eccfast.failure_rate": float64(0),
|
|
|
|
"attr.read_errors_corrected_by_eccfast.failure_rate": float64(0),
|
|
|
|
"attr.read_errors_corrected_by_eccfast.status": pkg.AttributeStatus(0),
|
|
|
|
"attr.read_errors_corrected_by_eccfast.status": int64(0),
|
|
|
|
"attr.read_errors_corrected_by_eccfast.status_reason": "",
|
|
|
|
"attr.read_errors_corrected_by_eccfast.status_reason": "",
|
|
|
|
"attr.read_errors_corrected_by_eccfast.thresh": int64(0),
|
|
|
|
"attr.read_errors_corrected_by_eccfast.thresh": int64(0),
|
|
|
|
"attr.read_errors_corrected_by_eccfast.transformed_value": int64(0),
|
|
|
|
"attr.read_errors_corrected_by_eccfast.transformed_value": int64(0),
|
|
|
|