Skip to content

Commit

Permalink
Fix test assertion according to latest init script
Browse files Browse the repository at this point in the history
  • Loading branch information
alextu committed Dec 12, 2024
1 parent 5826749 commit f955e64
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -352,7 +353,7 @@ private void assertBuildScanPublished(Build build, boolean requireAppliedViaInit
String output = build.getConsole();

Matcher<String> 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()));
Expand Down

0 comments on commit f955e64

Please sign in to comment.