@@ -1456,6 +1456,77 @@ func TestExecuteWorkflow_DryRunBackgroundAndControlSteps(t *testing.T) {
14561456 require .NoError (t , err )
14571457}
14581458
1459+ func TestExecuteWorkflow_DryRunShellStepContainerOverride (t * testing.T ) {
1460+ stacksPath := "../../tests/fixtures/scenarios/workflows"
1461+ t .Setenv ("ATMOS_CLI_CONFIG_PATH" , stacksPath )
1462+ t .Setenv ("ATMOS_BASE_PATH" , stacksPath )
1463+
1464+ atmosConfig , err := cfg .InitCliConfig (schema.ConfigAndStacksInfo {}, false )
1465+ require .NoError (t , err )
1466+
1467+ workflowDef := & schema.WorkflowDefinition {
1468+ Description : "Test shell step container override in dry run" ,
1469+ Steps : []schema.WorkflowStep {{
1470+ Name : "step-container" ,
1471+ Type : schema .TaskTypeShell ,
1472+ Command : "echo in step container" ,
1473+ Container : & schema.WorkflowContainer {
1474+ Image : "alpine:latest" ,
1475+ },
1476+ }},
1477+ }
1478+
1479+ err = ExecuteWorkflow (atmosConfig , "test-step-container" , "/path/to/workflow.yaml" , workflowDef , true , "" , "" , "" )
1480+ require .NoError (t , err )
1481+ }
1482+
1483+ func TestExecuteWorkflow_DryRunShellWorkflowContainer (t * testing.T ) {
1484+ stacksPath := "../../tests/fixtures/scenarios/workflows"
1485+ t .Setenv ("ATMOS_CLI_CONFIG_PATH" , stacksPath )
1486+ t .Setenv ("ATMOS_BASE_PATH" , stacksPath )
1487+
1488+ atmosConfig , err := cfg .InitCliConfig (schema.ConfigAndStacksInfo {}, false )
1489+ require .NoError (t , err )
1490+
1491+ workflowDef := & schema.WorkflowDefinition {
1492+ Description : "Test workflow container shell step in dry run" ,
1493+ Container : & schema.WorkflowContainer {
1494+ Image : "alpine:latest" ,
1495+ },
1496+ Output : "none" ,
1497+ Steps : []schema.WorkflowStep {{
1498+ Name : "workflow-container" ,
1499+ Type : schema .TaskTypeShell ,
1500+ Command : "echo in workflow container" ,
1501+ }},
1502+ }
1503+
1504+ err = ExecuteWorkflow (atmosConfig , "test-workflow-container" , "/path/to/workflow.yaml" , workflowDef , true , "" , "" , "" )
1505+ require .NoError (t , err )
1506+ }
1507+
1508+ func TestExecuteWorkflow_DryRunAtmosStepStackBeforeSeparator (t * testing.T ) {
1509+ stacksPath := "../../tests/fixtures/scenarios/workflows"
1510+ t .Setenv ("ATMOS_CLI_CONFIG_PATH" , stacksPath )
1511+ t .Setenv ("ATMOS_BASE_PATH" , stacksPath )
1512+
1513+ atmosConfig , err := cfg .InitCliConfig (schema.ConfigAndStacksInfo {}, false )
1514+ require .NoError (t , err )
1515+
1516+ workflowDef := & schema.WorkflowDefinition {
1517+ Description : "Test atmos step stack insertion before separator" ,
1518+ Steps : []schema.WorkflowStep {{
1519+ Name : "plan" ,
1520+ Type : schema .TaskTypeAtmos ,
1521+ Command : "terraform plan vpc -- -target=module.example" ,
1522+ Stack : "tenant1-ue2-dev" ,
1523+ }},
1524+ }
1525+
1526+ err = ExecuteWorkflow (atmosConfig , "test-atmos-stack-before-separator" , "/path/to/workflow.yaml" , workflowDef , true , "" , "" , "" )
1527+ require .NoError (t , err )
1528+ }
1529+
14591530func registerGitHubLogGroupingForWorkflowTest (t * testing.T ) {
14601531 t .Helper ()
14611532
0 commit comments