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

Function TestCreateInstanceRequestA100Alias

cmd/create_test.go:269–293  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

267}
268
269func 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.

Callers

nothing calls this directly

Calls 3

tmplEntryFunction · 0.85
validateCreateConfigFunction · 0.85
testSpecStoreFunction · 0.70

Tested by

no test coverage detected