Skip to content

Commit 75a1747

Browse files
committed
add UT
1 parent c43e858 commit 75a1747

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

cmd/skaffold/app/cmd/parse_config_test.go

+18
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,24 @@ requires:
171171
createCfg("cfg00", "image00", ".", []latest.ConfigDependency{{Names: []string{"cfg01"}}, {Path: "doc2", Names: []string{"cfg21"}}}),
172172
},
173173
},
174+
{
175+
description: "dependencies in same file",
176+
documents: []document{
177+
{path: "skaffold.yaml", configs: []mockCfg{{name: "cfg00", requiresStanza: `
178+
requires:
179+
- path: doc1
180+
`}}},
181+
{path: "doc1/skaffold.yaml", configs: []mockCfg{{name: "cfg10", requiresStanza: `
182+
requires:
183+
- configs: [cfg11]
184+
`}, {name: "cfg11", requiresStanza: ""}}},
185+
},
186+
expected: []*latest.SkaffoldConfig{
187+
createCfg("cfg11", "image11", "doc1", nil),
188+
createCfg("cfg10", "image10", "doc1", []latest.ConfigDependency{{Names: []string{"cfg11"}}}),
189+
createCfg("cfg00", "image00", ".", []latest.ConfigDependency{{Path: "doc1"}}),
190+
},
191+
},
174192
{
175193
description: "looped dependencies",
176194
documents: []document{

0 commit comments

Comments
 (0)