31 lines
681 B
Go
31 lines
681 B
Go
package platform
|
|
|
|
import "testing"
|
|
|
|
func TestStorageSATCommands(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
nvme := storageSATCommands("/dev/nvme0n1")
|
|
if len(nvme) != 3 || nvme[2].cmd[0] != "nvme" {
|
|
t.Fatalf("unexpected nvme commands: %#v", nvme)
|
|
}
|
|
|
|
sata := storageSATCommands("/dev/sda")
|
|
if len(sata) != 2 || sata[0].cmd[0] != "smartctl" {
|
|
t.Fatalf("unexpected sata commands: %#v", sata)
|
|
}
|
|
}
|
|
|
|
func TestRunNvidiaAcceptancePackIncludesGPUStress(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
jobs := nvidiaSATJobs()
|
|
|
|
if len(jobs) != 5 {
|
|
t.Fatalf("jobs=%d want 5", len(jobs))
|
|
}
|
|
if got := jobs[4].cmd[0]; got != "bee-gpu-stress" {
|
|
t.Fatalf("gpu stress command=%q want bee-gpu-stress", got)
|
|
}
|
|
}
|