@@ -837,7 +837,7 @@ workflowWithCopyright(
837
837
verifyInstalledDistribution(
838
838
name = " Test - wsl-bash_${expr(" matrix.distributions.distribution$i .user-id" )} should use the correct distribution" ,
839
839
conditionTransformer = if (distributions[i] == ubuntu2004) {
840
- { executeActionStep.getSuccessNotOnUbuntu2004Condition(i ) }
840
+ { executeActionStep.getSuccessNotOnDistributionCondition(i, " Ubuntu-20.04 " ) }
841
841
} else {
842
842
{ it }
843
843
},
@@ -849,7 +849,7 @@ workflowWithCopyright(
849
849
if (distributions[i] == ubuntu2004) {
850
850
verifyInstalledDistribution(
851
851
name = " Test - wsl-bash_${expr(" matrix.distributions.distribution$i .user-id" )} should use the correct distribution" ,
852
- conditionTransformer = { executeActionStep.getSuccessNotOnUbuntu2204Condition(i ) },
852
+ conditionTransformer = { executeActionStep.getSuccessNotOnDistributionCondition(i, " Ubuntu-22.04 " ) },
853
853
shell = Shell .Custom (" wsl-bash_${distributions[i][" user-id" ]} {0}" ),
854
854
expectedPatternExpression = " matrix.distributions.distribution$i .match-pattern"
855
855
)
@@ -1057,14 +1057,8 @@ val Step.successOnAlpineCondition
1057
1057
&& (matrix.distribution.user-id == 'Alpine')
1058
1058
""" .trimIndent()
1059
1059
1060
- fun Step.getSuccessNotOnUbuntu2004Condition (i : Int ) = """
1060
+ fun Step.getSuccessNotOnDistributionCondition (i : Int , distribution : String ) = """
1061
1061
always()
1062
1062
&& (${outcome.eq(Success )} )
1063
- && (matrix.distributions.distribution$i .user-id != 'Ubuntu-20.04')
1064
- """ .trimIndent()
1065
-
1066
- fun Step.getSuccessNotOnUbuntu2204Condition (i : Int ) = """
1067
- always()
1068
- && ($outcome == 'success')
1069
- && (matrix.distributions.distribution$i .user-id != 'Ubuntu-22.04')
1063
+ && (matrix.distributions.distribution$i .user-id != '$distribution ')
1070
1064
""" .trimIndent()
0 commit comments