diff --git a/acceptance-tests/src/test/java/hudson/plugins/gradle/GradleInjectionTest.java b/acceptance-tests/src/test/java/hudson/plugins/gradle/GradleInjectionTest.java index 5311918a..f1dad94a 100644 --- a/acceptance-tests/src/test/java/hudson/plugins/gradle/GradleInjectionTest.java +++ b/acceptance-tests/src/test/java/hudson/plugins/gradle/GradleInjectionTest.java @@ -27,6 +27,7 @@ import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; +import static org.jenkinsci.test.acceptance.Matchers.containsRegexp; import static org.jenkinsci.test.acceptance.Matchers.containsString; public class GradleInjectionTest extends AbstractAcceptanceTest { @@ -352,7 +353,7 @@ private void assertBuildScanPublished(Build build, boolean requireAppliedViaInit String output = build.getConsole(); Matcher appliedViaInitScriptMatcher = - containsString("Applying com.gradle.enterprise.gradleplugin.GradleEnterprisePlugin via init script"); + containsRegexp("Applying com.gradle.enterprise.gradleplugin.GradleEnterprisePlugin with version (.*) via init script"); assertThat(output, requireAppliedViaInitScript ? appliedViaInitScriptMatcher : not(appliedViaInitScriptMatcher)); assertRequiredLogLines(output, requiredLogsLines); assertThat(output, containsString("Publishing build scan..." + System.lineSeparator() + mockGeServer.publicBuildScanId()));