(t *testing.T)
| 110 | } |
| 111 | |
| 112 | func TestStorageRange(t *testing.T) { |
| 113 | s := testSpecStore() |
| 114 | |
| 115 | tests := []struct { |
| 116 | name string |
| 117 | gpuType string |
| 118 | numGPUs int |
| 119 | expectedMin int |
| 120 | expectedMax int |
| 121 | }{ |
| 122 | {"a6000", "a6000", 1, 100, 500}, |
| 123 | {"a100xl x1", "a100xl", 1, 100, 500}, |
| 124 | {"a100xl x2", "a100xl", 2, 100, 1000}, |
| 125 | {"unknown falls back to 100-1000", "unknown", 1, 100, 1000}, |
| 126 | } |
| 127 | |
| 128 | for _, tt := range tests { |
| 129 | t.Run(tt.name, func(t *testing.T) { |
| 130 | minGB, maxGB := s.StorageRange(tt.gpuType, tt.numGPUs) |
| 131 | assert.Equal(t, tt.expectedMin, minGB) |
| 132 | assert.Equal(t, tt.expectedMax, maxGB) |
| 133 | }) |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | func TestNormalizeGPUType(t *testing.T) { |
| 138 | s := testSpecStore() |
nothing calls this directly
no test coverage detected