TestCreateConfigTemplateCaseInsensitive verifies that template matching is case-insensitive when comparing with display names.
(t *testing.T)
| 408 | // TestCreateConfigTemplateCaseInsensitive verifies that template matching |
| 409 | // is case-insensitive when comparing with display names. |
| 410 | func TestCreateConfigTemplateCaseInsensitive(t *testing.T) { |
| 411 | config := &tui.CreateConfig{ |
| 412 | GPUType: "a6000", |
| 413 | VCPUs: 6, |
| 414 | Template: "UBUNTU 22.04", |
| 415 | DiskSizeGB: 100, |
| 416 | } |
| 417 | |
| 418 | templates := []api.TemplateEntry{ |
| 419 | tmplEntry("ubuntu-22.04", "Ubuntu 22.04"), |
| 420 | } |
| 421 | |
| 422 | err := validateCreateConfig(config, templates, []api.Snapshot{}, false, testSpecStore()) |
| 423 | require.NoError(t, err) |
| 424 | |
| 425 | assert.Equal(t, "ubuntu-22.04", config.Template) |
| 426 | } |
| 427 | |
| 428 | // TestCreateConfigTemplateByDisplayName verifies that templates can be |
| 429 | // matched by their display name and converted to the appropriate key. |
nothing calls this directly
no test coverage detected