MCPcopy Create free account
hub / github.com/Thunder-Compute/thunder-cli / TestCreateConfigVCPUsAutoSet

Function TestCreateConfigVCPUsAutoSet

cmd/create_test.go:297–314  ·  view source on GitHub ↗

TestCreateConfigVCPUsAutoSet verifies that VCPUs are automatically selected for fixed-size specs.

(t *testing.T)

Source from the content-addressed store, hash-verified

295// TestCreateConfigVCPUsAutoSet verifies that VCPUs are automatically selected
296// for fixed-size specs.
297func 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
316func TestCreateConfigDefaultsDiskSizePerGPU(t *testing.T) {
317 config := &tui.CreateConfig{

Callers

nothing calls this directly

Calls 3

tmplEntryFunction · 0.85
validateCreateConfigFunction · 0.85
testSpecStoreFunction · 0.70

Tested by

no test coverage detected