Skip to content

Commit

Permalink
resolve name shadowing warning
Browse files Browse the repository at this point in the history
  • Loading branch information
jongchanpark-furiosa committed Aug 21, 2024
1 parent 781e7f4 commit 0693bef
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions pkg/smi/device_error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
)

func testDeviceErrorInfo(arch Arch, t *testing.T, expected DeviceErrorInfo) {
device := getStaticMockDevice(arch, 0)
mockdevice := getStaticMockDevice(arch, 0)

device_error_info, err := device.DeviceErrorInfo()
device_error_info, err := mockdevice.DeviceErrorInfo()

if err != nil {
t.Errorf("Failed to get Device Error Info")
Expand Down
4 changes: 2 additions & 2 deletions pkg/smi/device_file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
)

func testDeviceFiles(arch Arch, t *testing.T, expected []DeviceFile) {
device := getStaticMockDevice(arch, 0)
mockdevice := getStaticMockDevice(arch, 0)

device_files, err := device.DeviceFiles()
device_files, err := mockdevice.DeviceFiles()

if err != nil {
t.Errorf("Failed to get Device Files")
Expand Down
4 changes: 2 additions & 2 deletions pkg/smi/device_info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
)

func testDeviceInfo(arch Arch, t *testing.T, expected DeviceInfo) {
device := getStaticMockDevice(arch, 0)
mockdevice := getStaticMockDevice(arch, 0)

device_info, err := device.DeviceInfo()
device_info, err := mockdevice.DeviceInfo()

if err != nil {
t.Errorf("Failed to get Device Information")
Expand Down
8 changes: 4 additions & 4 deletions pkg/smi/device_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
)

func testCoreStatus(arch Arch, t *testing.T, expected map[uint32]CoreStatus) {
device := getStaticMockDevice(arch, 0)
mockdevice := getStaticMockDevice(arch, 0)

core_status, err := device.CoreStatus()
core_status, err := mockdevice.CoreStatus()

if err != nil {
t.Errorf("Failed to get core status")
Expand Down Expand Up @@ -40,9 +40,9 @@ func TestRngdCoreStatus(t *testing.T) {
}

func testLiveness(arch Arch, t *testing.T, expected bool) {
device := getStaticMockDevice(arch, 0)
mockdevice := getStaticMockDevice(arch, 0)

liveness, err := device.Liveness()
liveness, err := mockdevice.Liveness()

if err != nil {
t.Errorf("Failed to get liveness")
Expand Down
12 changes: 6 additions & 6 deletions pkg/smi/performance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
)

func testDeviceTemperature(arch Arch, t *testing.T, expected deviceTemperature) {
device := getStaticMockDevice(arch, 0)
mockdevice := getStaticMockDevice(arch, 0)

temperature, err := device.DeviceTemperature()
temperature, err := mockdevice.DeviceTemperature()
if err != nil {
t.Errorf("Failed to get Device Temperature")
}
Expand All @@ -36,9 +36,9 @@ func TestRngdDeviceTemperature(t *testing.T) {
}

func testPowerConsumption(arch Arch, t *testing.T, expected float64) {
device := getStaticMockDevice(arch, 0)
mockdevice := getStaticMockDevice(arch, 0)

power, err := device.PowerConsumption()
power, err := mockdevice.PowerConsumption()
if err != nil {
t.Errorf("Failed to get Power Consumption")
}
Expand All @@ -61,9 +61,9 @@ func TestRngdPowerConsumption(t *testing.T) {
}

func testDeviceUtilization(arch Arch, t *testing.T) {
device := getStaticMockDevice(arch, 0)
mockdevice := getStaticMockDevice(arch, 0)

_, err := device.DeviceUtilization() // Currenlty, not to check the value.
_, err := mockdevice.DeviceUtilization() // Currenlty, not to check the value.

if err != nil {
t.Errorf("Failed to get Device Utilization")
Expand Down

0 comments on commit 0693bef

Please sign in to comment.