@@ -113,8 +113,9 @@ func TestEnsureDockerImages(t *testing.T) {
113113 }
114114
115115 for name , steps := range map [string ][]batcheslib.Step {
116- "single step" : {{Container : "image" }},
117- "multiple steps" : {{Container : "image" }, {Container : "image" }},
116+ "single step" : {{Container : "image" }},
117+ "multiple steps" : {{Container : "image" }, {Container : "image" }},
118+ "dynamic deferred" : {{Container : "${{ outputs.imageName }}" }, {Container : "image" }},
118119 } {
119120 t .Run (name , func (t * testing.T ) {
120121 for _ , parallelism := range parallelCases {
@@ -265,6 +266,35 @@ some-new-field: Foo bar
265266` ,
266267 expectedErr : errors .New ("parsing batch spec: Additional property some-new-field is not allowed" ),
267268 },
269+ {
270+ name : "step image alias" ,
271+ rawSpec : `
272+ name: test-spec
273+ description: A test spec
274+ steps:
275+ - run: echo hi
276+ image: alpine:3
277+ changesetTemplate:
278+ title: Test
279+ body: Test
280+ branch: test
281+ commit:
282+ message: Test
283+ ` ,
284+ expectedSpec : & batcheslib.BatchSpec {
285+ Name : "test-spec" ,
286+ Description : "A test spec" ,
287+ Steps : []batcheslib.Step {
288+ {Run : "echo hi" , Container : "alpine:3" , Image : "alpine:3" },
289+ },
290+ ChangesetTemplate : & batcheslib.ChangesetTemplate {
291+ Title : "Test" ,
292+ Body : "Test" ,
293+ Branch : "test" ,
294+ Commit : batcheslib.ExpandedGitCommitDescription {Message : "Test" },
295+ },
296+ },
297+ },
268298 {
269299 name : "supported version" ,
270300 rawSpec : `
0 commit comments