-
-
Notifications
You must be signed in to change notification settings - Fork 153
Expand file tree
/
Copy pathworkflow_test.go
More file actions
727 lines (640 loc) · 19.4 KB
/
workflow_test.go
File metadata and controls
727 lines (640 loc) · 19.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
package exec
import (
"os"
"path/filepath"
"testing"
"github.com/spf13/cobra"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"mvdan.cc/sh/v3/shell"
errUtils "github.com/cloudposse/atmos/errors"
cfg "github.com/cloudposse/atmos/pkg/config"
"github.com/cloudposse/atmos/pkg/schema"
"github.com/cloudposse/atmos/pkg/workflow"
)
func TestExecuteWorkflow(t *testing.T) {
stacksPath := "../../../tests/fixtures/scenarios/workflows"
t.Setenv("ATMOS_CLI_CONFIG_PATH", stacksPath)
t.Setenv("ATMOS_BASE_PATH", stacksPath)
workflowsDir := stacksPath + "/stacks/workflows"
workflowPath := workflowsDir + "/test.yaml"
config, err := cfg.InitCliConfig(schema.ConfigAndStacksInfo{}, false)
assert.NoError(t, err, "'InitCliConfig' should execute without error")
tests := []struct {
name string
workflow string
workflowPath string
workflowDef *schema.WorkflowDefinition
dryRun bool
commandLineStack string
fromStep string
wantErr bool
wantSentinel error
errContains string
}{
{
name: "valid workflow execution",
workflow: "test-workflow",
workflowPath: workflowPath,
workflowDef: &schema.WorkflowDefinition{
Steps: []schema.WorkflowStep{
{
Name: "step1",
Type: "shell",
Command: "echo 'Step 1'",
},
{
Name: "step2",
Type: "shell",
Command: "echo 'Step 2'",
},
},
},
dryRun: false,
commandLineStack: "",
fromStep: "",
wantErr: false,
},
{
name: "empty workflow",
workflow: "no-steps",
workflowPath: workflowPath,
workflowDef: &schema.WorkflowDefinition{
Steps: []schema.WorkflowStep{},
},
dryRun: false,
commandLineStack: "",
fromStep: "",
wantErr: true,
wantSentinel: errUtils.ErrWorkflowNoSteps,
},
{
name: "invalid step type",
workflow: "invalid-step",
workflowPath: workflowPath,
workflowDef: &schema.WorkflowDefinition{
Steps: []schema.WorkflowStep{
{
Name: "step1",
Type: "invalid",
Command: "echo 'Step 1'",
},
},
},
dryRun: false,
commandLineStack: "",
fromStep: "",
wantErr: true,
wantSentinel: errUtils.ErrInvalidWorkflowStepType,
},
{
name: "invalid from-step",
workflow: "test-workflow",
workflowPath: workflowPath,
workflowDef: &schema.WorkflowDefinition{
Steps: []schema.WorkflowStep{
{
Name: "step1",
Type: "shell",
Command: "echo 'Step 1'",
},
},
},
dryRun: false,
commandLineStack: "",
fromStep: "nonexistent-step",
wantErr: true,
wantSentinel: errUtils.ErrInvalidFromStep,
},
{
name: "failing shell command",
workflow: "failing-workflow",
workflowPath: workflowPath,
workflowDef: &schema.WorkflowDefinition{
Steps: []schema.WorkflowStep{
{
Name: "step1",
Type: "shell",
Command: "exit 1",
},
},
},
dryRun: false,
commandLineStack: "",
fromStep: "",
wantErr: true,
wantSentinel: errUtils.ErrWorkflowStepFailed,
},
{
name: "failing atmos command",
workflow: "failing-atmos-workflow",
workflowPath: workflowPath,
workflowDef: &schema.WorkflowDefinition{
Steps: []schema.WorkflowStep{
{
Name: "step1",
Type: "atmos",
Command: "invalid-command",
},
},
},
dryRun: false,
commandLineStack: "",
fromStep: "",
wantErr: true,
wantSentinel: errUtils.ErrWorkflowStepFailed,
},
{
name: "workflow with stack override",
workflow: "stack-workflow",
workflowPath: workflowPath,
workflowDef: &schema.WorkflowDefinition{
Stack: "prod",
Steps: []schema.WorkflowStep{
{
Name: "step1",
Type: "shell",
Command: "echo 'Step 1'",
},
},
},
dryRun: false,
commandLineStack: "dev",
fromStep: "",
wantErr: false,
},
{
name: "failing atmos command with stack",
workflow: "failing-atmos-with-stack",
workflowPath: workflowPath,
workflowDef: &schema.WorkflowDefinition{
Stack: "prod",
Steps: []schema.WorkflowStep{
{
Name: "step1",
Type: "atmos",
Command: "terraform plan mock -s idontexist",
},
},
},
dryRun: false,
commandLineStack: "",
fromStep: "",
wantErr: true,
wantSentinel: errUtils.ErrWorkflowStepFailed,
},
{
name: "failing atmos command with command line stack override",
workflow: "failing-atmos-with-cli-stack",
workflowPath: workflowPath,
workflowDef: &schema.WorkflowDefinition{
Stack: "prod",
Steps: []schema.WorkflowStep{
{
Name: "step1",
Type: "atmos",
Command: "terraform plan mock -s idontexist",
},
},
},
dryRun: false,
commandLineStack: "dev",
fromStep: "",
wantErr: true,
wantSentinel: errUtils.ErrWorkflowStepFailed,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
err := ExecuteWorkflow(
config,
tt.workflow,
tt.workflowPath,
tt.workflowDef,
tt.dryRun,
tt.commandLineStack,
tt.fromStep,
"", // No command-line identity for these tests
)
if tt.wantErr {
assert.Error(t, err)
if tt.wantSentinel != nil {
assert.ErrorIs(t, err, tt.wantSentinel)
}
if tt.errContains != "" {
assert.Contains(t, err.Error(), tt.errContains)
}
} else {
assert.NoError(t, err)
}
})
}
}
// TestShellFieldsQuoteParsing verifies that shell.Fields correctly parses quoted arguments.
// This test documents the fix for the issue where -var="key=value" was incorrectly parsed.
func TestShellFieldsQuoteParsing(t *testing.T) {
tests := []struct {
name string
command string
expected []string
}{
{
name: "double quoted var flag",
command: `terraform plan mock -var="enabled=false" -s nonprod`,
expected: []string{
"terraform", "plan", "mock", "-var=enabled=false", "-s", "nonprod",
},
},
{
name: "single quoted var flag",
command: `terraform plan mock -var='enabled=false' -s nonprod`,
expected: []string{
"terraform", "plan", "mock", "-var=enabled=false", "-s", "nonprod",
},
},
{
name: "multiple var flags with different quote styles",
command: `terraform plan mock -var="enabled=false" -var='foo=bar' -s nonprod`,
expected: []string{
"terraform", "plan", "mock", "-var=enabled=false", "-var=foo=bar", "-s", "nonprod",
},
},
{
name: "var with spaces in value",
command: `terraform plan mock -var="message=hello world" -s nonprod`,
expected: []string{
"terraform", "plan", "mock", "-var=message=hello world", "-s", "nonprod",
},
},
{
name: "var with equals in value",
command: `terraform plan mock -var="message=key=value" -s nonprod`,
expected: []string{
"terraform", "plan", "mock", "-var=message=key=value", "-s", "nonprod",
},
},
{
name: "query flag with quoted expression",
command: `terraform plan --query '.settings.enabled == true' -s nonprod`,
expected: []string{
"terraform", "plan", "--query", ".settings.enabled == true", "-s", "nonprod",
},
},
{
name: "complex auto-generate-backend-file flag",
command: `terraform deploy tfstate-backend -var="access_roles_enabled=false" --stack core-usw1-root --auto-generate-backend-file=false`,
expected: []string{
"terraform", "deploy", "tfstate-backend", "-var=access_roles_enabled=false",
"--stack", "core-usw1-root", "--auto-generate-backend-file=false",
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
// Use shell.Fields which is what the fixed code uses
args, err := shell.Fields(tt.command, nil)
assert.NoError(t, err)
assert.Equal(t, tt.expected, args, "shell.Fields should correctly parse quoted arguments")
})
}
}
func TestCheckAndGenerateWorkflowStepNames(t *testing.T) {
tests := []struct {
name string
input *schema.WorkflowDefinition
expected *schema.WorkflowDefinition
}{
{
name: "steps with names",
input: &schema.WorkflowDefinition{
Steps: []schema.WorkflowStep{
{
Name: "step1",
Type: "shell",
Command: "echo 'Step 1'",
},
{
Name: "step2",
Type: "shell",
Command: "echo 'Step 2'",
},
},
},
expected: &schema.WorkflowDefinition{
Steps: []schema.WorkflowStep{
{
Name: "step1",
Type: "shell",
Command: "echo 'Step 1'",
},
{
Name: "step2",
Type: "shell",
Command: "echo 'Step 2'",
},
},
},
},
{
name: "steps without names",
input: &schema.WorkflowDefinition{
Steps: []schema.WorkflowStep{
{
Type: "shell",
Command: "echo 'Step 1'",
},
{
Type: "shell",
Command: "echo 'Step 2'",
},
},
},
expected: &schema.WorkflowDefinition{
Steps: []schema.WorkflowStep{
{
Name: "step1",
Type: "shell",
Command: "echo 'Step 1'",
},
{
Name: "step2",
Type: "shell",
Command: "echo 'Step 2'",
},
},
},
},
{
name: "mixed steps",
input: &schema.WorkflowDefinition{
Steps: []schema.WorkflowStep{
{
Name: "custom-step",
Type: "shell",
Command: "echo 'Step 1'",
},
{
Type: "shell",
Command: "echo 'Step 2'",
},
},
},
expected: &schema.WorkflowDefinition{
Steps: []schema.WorkflowStep{
{
Name: "custom-step",
Type: "shell",
Command: "echo 'Step 1'",
},
{
Name: "step2",
Type: "shell",
Command: "echo 'Step 2'",
},
},
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
workflow.CheckAndGenerateWorkflowStepNames(tt.input)
assert.Equal(t, tt.expected, tt.input)
})
}
}
// TestExecuteWorkflowCmd tests the ExecuteWorkflowCmd function.
func TestExecuteWorkflowCmd(t *testing.T) {
// Create a helper to set up cobra command with workflow flags.
createWorkflowCmd := func() *cobra.Command {
cmd := &cobra.Command{
Use: "workflow",
}
// Workflow-specific flags.
cmd.PersistentFlags().StringP("file", "f", "", "Workflow file")
cmd.PersistentFlags().Bool("dry-run", false, "Dry run")
cmd.PersistentFlags().StringP("stack", "s", "", "Stack")
cmd.PersistentFlags().String("from-step", "", "From step")
cmd.PersistentFlags().String("identity", "", "Identity")
// Flags expected by ProcessCommandLineArgs.
cmd.PersistentFlags().String("base-path", "", "Base path")
cmd.PersistentFlags().StringSlice("config", []string{}, "Config files")
cmd.PersistentFlags().StringSlice("config-path", []string{}, "Config paths")
cmd.PersistentFlags().StringSlice("profile", []string{}, "Configuration profile")
return cmd
}
t.Run("successful workflow execution", func(t *testing.T) {
// Note: These tests are run from the module root, so use paths relative to module root.
stacksPath := "../../tests/fixtures/scenarios/workflows"
t.Setenv("ATMOS_CLI_CONFIG_PATH", stacksPath)
t.Setenv("ATMOS_BASE_PATH", stacksPath)
cmd := createWorkflowCmd()
err := cmd.ParseFlags([]string{"--file", "test.yaml"})
require.NoError(t, err)
// Execute with workflow name.
args := []string{"shell-pass"}
err = ExecuteWorkflowCmd(cmd, args)
// Should succeed.
assert.NoError(t, err)
})
t.Run("auto-discovery with no file flag - workflow not found", func(t *testing.T) {
stacksPath := "../../tests/fixtures/scenarios/workflows"
t.Setenv("ATMOS_CLI_CONFIG_PATH", stacksPath)
t.Setenv("ATMOS_BASE_PATH", stacksPath)
cmd := createWorkflowCmd()
// Don't set --file flag - should auto-discover workflow.
// Use a workflow name that doesn't exist.
args := []string{"nonexistent-workflow"}
err := ExecuteWorkflowCmd(cmd, args)
// Should error with "no workflow found" message.
assert.Error(t, err)
assert.ErrorIs(t, err, errUtils.ErrWorkflowNoWorkflow)
})
t.Run("file not found", func(t *testing.T) {
stacksPath := "../../tests/fixtures/scenarios/workflows"
t.Setenv("ATMOS_CLI_CONFIG_PATH", stacksPath)
t.Setenv("ATMOS_BASE_PATH", stacksPath)
cmd := createWorkflowCmd()
err := cmd.ParseFlags([]string{"--file", "nonexistent-file.yaml"})
require.NoError(t, err)
args := []string{"some-workflow"}
err = ExecuteWorkflowCmd(cmd, args)
assert.Error(t, err)
assert.ErrorIs(t, err, errUtils.ErrWorkflowFileNotFound)
})
t.Run("absolute file path", func(t *testing.T) {
stacksPath := "../../tests/fixtures/scenarios/workflows"
t.Setenv("ATMOS_CLI_CONFIG_PATH", stacksPath)
t.Setenv("ATMOS_BASE_PATH", stacksPath)
// Use absolute path to workflow file.
absPath, err := filepath.Abs("../../tests/fixtures/scenarios/workflows/stacks/workflows/test.yaml")
require.NoError(t, err)
cmd := createWorkflowCmd()
err = cmd.ParseFlags([]string{"--file", absPath})
require.NoError(t, err)
args := []string{"shell-pass"}
err = ExecuteWorkflowCmd(cmd, args)
assert.NoError(t, err)
})
t.Run("file without extension", func(t *testing.T) {
stacksPath := "../../tests/fixtures/scenarios/workflows"
t.Setenv("ATMOS_CLI_CONFIG_PATH", stacksPath)
t.Setenv("ATMOS_BASE_PATH", stacksPath)
cmd := createWorkflowCmd()
// Specify file without .yaml extension - should auto-add it.
err := cmd.ParseFlags([]string{"--file", "test"})
require.NoError(t, err)
args := []string{"shell-pass"}
err = ExecuteWorkflowCmd(cmd, args)
assert.NoError(t, err)
})
t.Run("dry-run flag", func(t *testing.T) {
stacksPath := "../../tests/fixtures/scenarios/workflows"
t.Setenv("ATMOS_CLI_CONFIG_PATH", stacksPath)
t.Setenv("ATMOS_BASE_PATH", stacksPath)
cmd := createWorkflowCmd()
err := cmd.ParseFlags([]string{"--file", "test.yaml", "--dry-run"})
require.NoError(t, err)
args := []string{"shell-pass"}
err = ExecuteWorkflowCmd(cmd, args)
// Dry run should not error.
assert.NoError(t, err)
})
t.Run("stack override", func(t *testing.T) {
stacksPath := "../../tests/fixtures/scenarios/workflows"
t.Setenv("ATMOS_CLI_CONFIG_PATH", stacksPath)
t.Setenv("ATMOS_BASE_PATH", stacksPath)
cmd := createWorkflowCmd()
err := cmd.ParseFlags([]string{"--file", "test.yaml", "--stack", "dev"})
require.NoError(t, err)
// Use a workflow.
args := []string{"shell-pass"}
err = ExecuteWorkflowCmd(cmd, args)
// Should succeed with stack override.
assert.NoError(t, err)
})
t.Run("from-step flag", func(t *testing.T) {
stacksPath := "../../tests/fixtures/scenarios/workflows"
t.Setenv("ATMOS_CLI_CONFIG_PATH", stacksPath)
t.Setenv("ATMOS_BASE_PATH", stacksPath)
cmd := createWorkflowCmd()
err := cmd.ParseFlags([]string{"--file", "test.yaml", "--from-step", "step1"})
require.NoError(t, err)
args := []string{"shell-pass"}
err = ExecuteWorkflowCmd(cmd, args)
// Should start from step1 (the only step in shell-pass workflow).
assert.NoError(t, err)
})
t.Run("identity flag", func(t *testing.T) {
stacksPath := "../../tests/fixtures/scenarios/workflows"
t.Setenv("ATMOS_CLI_CONFIG_PATH", stacksPath)
t.Setenv("ATMOS_BASE_PATH", stacksPath)
cmd := createWorkflowCmd()
err := cmd.ParseFlags([]string{"--file", "test.yaml", "--identity", "test-identity"})
require.NoError(t, err)
args := []string{"shell-pass"}
err = ExecuteWorkflowCmd(cmd, args)
// Should error because identity doesn't exist (but flag was passed through correctly).
assert.Error(t, err)
assert.Contains(t, err.Error(), "test-identity")
})
t.Run("invalid workflow manifest - no workflows key", func(t *testing.T) {
stacksPath := "../../tests/fixtures/scenarios/workflows"
t.Setenv("ATMOS_CLI_CONFIG_PATH", stacksPath)
t.Setenv("ATMOS_BASE_PATH", stacksPath)
cmd := createWorkflowCmd()
// test-invalid.yaml exists but has no workflows: key.
err := cmd.ParseFlags([]string{"--file", "test-invalid.yaml"})
require.NoError(t, err)
args := []string{"any-workflow"}
err = ExecuteWorkflowCmd(cmd, args)
assert.Error(t, err)
assert.ErrorIs(t, err, errUtils.ErrInvalidWorkflowManifest)
})
t.Run("workflow name not found in manifest", func(t *testing.T) {
stacksPath := "../../tests/fixtures/scenarios/workflows"
t.Setenv("ATMOS_CLI_CONFIG_PATH", stacksPath)
t.Setenv("ATMOS_BASE_PATH", stacksPath)
cmd := createWorkflowCmd()
err := cmd.ParseFlags([]string{"--file", "test.yaml"})
require.NoError(t, err)
// Request a workflow name that doesn't exist in test.yaml.
args := []string{"nonexistent-workflow-name"}
err = ExecuteWorkflowCmd(cmd, args)
assert.Error(t, err)
assert.ErrorIs(t, err, errUtils.ErrWorkflowNoWorkflow)
})
t.Run("auto-discovery single match", func(t *testing.T) {
stacksPath := "../../tests/fixtures/scenarios/workflows"
t.Setenv("ATMOS_CLI_CONFIG_PATH", stacksPath)
t.Setenv("ATMOS_BASE_PATH", stacksPath)
cmd := createWorkflowCmd()
// Don't set --file flag - auto-discovery should find the single match.
// Use a workflow name that exists in only one file.
args := []string{"shell-pass"}
err := ExecuteWorkflowCmd(cmd, args)
// Should succeed with auto-discovery finding the single match.
assert.NoError(t, err)
})
t.Run("auto-discovery multiple matches in non-TTY", func(t *testing.T) {
// Create a temp directory with multiple workflow files containing the same workflow.
tmpDir := t.TempDir()
workflowsDir := filepath.Join(tmpDir, "stacks", "workflows")
stacksDir := filepath.Join(tmpDir, "stacks")
err := os.MkdirAll(workflowsDir, 0o755)
require.NoError(t, err)
// Create a dummy stack file to satisfy config validation.
dummyStack := `components: {}`
err = os.WriteFile(filepath.Join(stacksDir, "dummy.yaml"), []byte(dummyStack), 0o644)
require.NoError(t, err)
// Create atmos.yaml with complete config.
atmosConfig := `
base_path: ""
stacks:
base_path: "stacks"
included_paths:
- "**/*"
excluded_paths:
- "workflows/**/*"
name_pattern: "{stack}"
workflows:
base_path: "stacks/workflows"
`
err = os.WriteFile(filepath.Join(tmpDir, "atmos.yaml"), []byte(atmosConfig), 0o644)
require.NoError(t, err)
// Create two workflow files with the same workflow name.
workflow1 := `
workflows:
duplicate-workflow:
steps:
- name: step1
type: shell
command: echo file1
`
err = os.WriteFile(filepath.Join(workflowsDir, "file1.yaml"), []byte(workflow1), 0o644)
require.NoError(t, err)
workflow2 := `
workflows:
duplicate-workflow:
steps:
- name: step1
type: shell
command: echo file2
`
err = os.WriteFile(filepath.Join(workflowsDir, "file2.yaml"), []byte(workflow2), 0o644)
require.NoError(t, err)
t.Setenv("ATMOS_CLI_CONFIG_PATH", tmpDir)
t.Setenv("ATMOS_BASE_PATH", tmpDir)
// CI env variable ensures non-TTY detection.
t.Setenv("CI", "true")
cmd := createWorkflowCmd()
// Don't set --file flag - auto-discovery will find multiple matches.
args := []string{"duplicate-workflow"}
err = ExecuteWorkflowCmd(cmd, args)
// Should error with multiple matches message since we're in CI.
assert.Error(t, err)
assert.ErrorIs(t, err, errUtils.ErrWorkflowNoWorkflow)
// Use Format to get the full formatted error including hints.
formattedErr := errUtils.Format(err, errUtils.DefaultFormatterConfig())
assert.Contains(t, formattedErr, "Multiple workflow files")
})
}