@@ -837,7 +837,7 @@ workflowWithCopyright(
837837 verifyInstalledDistribution(
838838 name = " Test - wsl-bash_${expr(" matrix.distributions.distribution$i .user-id" )} should use the correct distribution" ,
839839 conditionTransformer = if (distributions[i] == ubuntu2004) {
840- { executeActionStep.getSuccessNotOnUbuntu2004Condition(i ) }
840+ { executeActionStep.getSuccessNotOnDistributionCondition(i, " Ubuntu-20.04 " ) }
841841 } else {
842842 { it }
843843 },
@@ -849,7 +849,7 @@ workflowWithCopyright(
849849 if (distributions[i] == ubuntu2004) {
850850 verifyInstalledDistribution(
851851 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 " ) },
853853 shell = Shell .Custom (" wsl-bash_${distributions[i][" user-id" ]} {0}" ),
854854 expectedPatternExpression = " matrix.distributions.distribution$i .match-pattern"
855855 )
@@ -1057,14 +1057,8 @@ val Step.successOnAlpineCondition
10571057 && (matrix.distribution.user-id == 'Alpine')
10581058 """ .trimIndent()
10591059
1060- fun Step.getSuccessNotOnUbuntu2004Condition (i : Int ) = """
1060+ fun Step.getSuccessNotOnDistributionCondition (i : Int , distribution : String ) = """
10611061 always()
10621062 && (${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 ')
10701064""" .trimIndent()
0 commit comments