MCPcopy Index your code
hub / github.com/devspace-sh/devspace / TestParseConfig

Function TestParseConfig

pkg/devspace/config/loader/loader_test.go:586–1965  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

584}
585
586func TestParseConfig(t *testing.T) {
587 testCases := []*parseTestCase{
588 {
589 name: "Simple",
590 in: &parseTestCaseInput{
591 config: `
592version: v1beta11`,
593 options: &ConfigOptions{},
594 generatedConfig: &localcache.LocalCache{Vars: map[string]string{}},
595 },
596 expected: &latest.Config{
597 Pipelines: map[string]*latest.Pipeline{
598 "build": &latest.Pipeline{},
599 "deploy": &latest.Pipeline{},
600 "dev": &latest.Pipeline{
601 Run: "start_dev --all",
602 },
603 "purge": &latest.Pipeline{
604 Run: "stop_dev --all",
605 },
606 },
607 Vars: convertedVars,
608 },
609 },
610 {
611 name: "Simple with deployments",
612 in: &parseTestCaseInput{
613 config: `
614version: v1beta3
615deployments:
616- name: test
617 component:
618 containers:
619 - image: nginx`,
620 options: &ConfigOptions{},
621 generatedConfig: &localcache.LocalCache{Vars: map[string]string{}},
622 },
623 expected: &latest.Config{
624 Pipelines: testPipeline,
625 Deployments: map[string]*latest.DeploymentConfig{
626 "test": {
627 Helm: &latest.HelmConfig{
628 Values: map[string]interface{}{
629 "containers": []interface{}{
630 map[string]interface{}{
631 "image": "nginx",
632 },
633 },
634 },
635 },
636 },
637 },
638 Vars: convertedVars,
639 },
640 },
641 {
642 name: "Variables",
643 in: &parseTestCaseInput{

Callers

nothing calls this directly

Calls 7

NewConfigLoaderFunction · 0.85
NewDefaultParserFunction · 0.85
stripNamesFunction · 0.85
parseConfigMethod · 0.80
EqualMethod · 0.80
FatalfMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected