(t *testing.T)
| 267 | } |
| 268 | |
| 269 | func TestCreateInstanceRequestA100Alias(t *testing.T) { |
| 270 | config := &tui.CreateConfig{ |
| 271 | GPUType: "a100", |
| 272 | VCPUs: 8, |
| 273 | Template: "ubuntu-22.04", |
| 274 | DiskSizeGB: 100, |
| 275 | } |
| 276 | |
| 277 | templates := []api.TemplateEntry{ |
| 278 | tmplEntry("ubuntu-22.04", "Ubuntu 22.04"), |
| 279 | } |
| 280 | |
| 281 | require.NoError(t, validateCreateConfig(config, templates, []api.Snapshot{}, false, testSpecStore())) |
| 282 | |
| 283 | req := api.CreateInstanceRequest{ |
| 284 | GPUType: config.GPUType, |
| 285 | NumGPUs: config.NumGPUs, |
| 286 | CPUCores: config.VCPUs, |
| 287 | Template: config.Template, |
| 288 | DiskSizeGB: config.DiskSizeGB, |
| 289 | } |
| 290 | |
| 291 | assert.Equal(t, "a100xl", req.GPUType) |
| 292 | assert.Equal(t, 1, req.NumGPUs) |
| 293 | } |
| 294 | |
| 295 | // TestCreateConfigVCPUsAutoSet verifies that VCPUs are automatically selected |
| 296 | // for fixed-size specs. |
nothing calls this directly
no test coverage detected