TestCreateConfigVCPUsAutoSet verifies that VCPUs are automatically selected for fixed-size specs.
(t *testing.T)
| 295 | // TestCreateConfigVCPUsAutoSet verifies that VCPUs are automatically selected |
| 296 | // for fixed-size specs. |
| 297 | func TestCreateConfigVCPUsAutoSet(t *testing.T) { |
| 298 | config := &tui.CreateConfig{ |
| 299 | GPUType: "a100", |
| 300 | NumGPUs: 4, |
| 301 | VCPUs: 0, |
| 302 | Template: "pytorch", |
| 303 | DiskSizeGB: 100, |
| 304 | } |
| 305 | |
| 306 | templates := []api.TemplateEntry{ |
| 307 | tmplEntry("pytorch", "PyTorch"), |
| 308 | } |
| 309 | |
| 310 | err := validateCreateConfig(config, templates, []api.Snapshot{}, false, testSpecStore()) |
| 311 | require.NoError(t, err) |
| 312 | |
| 313 | assert.Equal(t, 60, config.VCPUs) |
| 314 | } |
| 315 | |
| 316 | func TestCreateConfigDefaultsDiskSizePerGPU(t *testing.T) { |
| 317 | config := &tui.CreateConfig{ |
nothing calls this directly
no test coverage detected