Skip to content

Commit fbc5b8b

Browse files
committed
Adjust expected string to JCasC 1.27
The GitJCasCCompatibilityTest extends RoundTripAbstractTest from the configuration as code plugin test suite. In JCasC 1.25, logging in the test was set to 'INFO' and the assertion was testing that the 'INFO' level logging in that version of JCasC was reporting that the submodule configuration contained two empty members. The submodule configuration should not have contained two empty members, but there was a bug in submodule configuration setting. That bug was fixed earlier, but the bug fix did not change the INFO level logging of configuration as code plugin 1.25. In JCasC 1.27, test logging is set to 'FINER' and the logged statements have changed significantly. This assertion can now check that specific values from the resource jenkins/plugins/git/configuration-as-code.yaml are correctly reported in the JCasC 1.27 log file. JCasC 1.27 allows much more precise checks that the submodule config detail is correct. The revised stringInLogExpected return value provides that more precise confirmation. Refer to 'mybranch-3' and 'mybranch-4' in the resource jenkins/plugins/git/configuration-as-code.yaml Thanks for the finer grained checks in the RoundTripAbstractTest and the finer grained output from the configuration as code plugin!
1 parent 8c9f9e9 commit fbc5b8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/java/jenkins/plugins/git/GitJCasCCompatibilityTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ protected void assertConfiguredAsExpected(RestartableJenkinsRule restartableJenk
3535

3636
@Override
3737
protected String stringInLogExpected() {
38-
return "Setting class hudson.plugins.git.GitSCM.submoduleCfg = [{}, {}]";
38+
return "Setting class hudson.plugins.git.SubmoduleConfig. branches = [mybranch-3, mybranch-4]";
3939
}
4040
}

0 commit comments

Comments
 (0)