Make LogoutputIT more stable (original) (raw)
Describe the bug
Currently we check in LogoutputIT with the following code
assertThat(result)
.out()
.warn()
.containsExactly("Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!");This will assume that each build platform will be configured having UTF-8 as encoding which can't be assumed.
Expected behavior
Replace it with the following code which does not imply any kind of encoding only that the warning is being
produced based that it is not defined for resources in the given Maven build.
assertThat(result).out().warn()
.hasSize(1)
.allSatisfy(l -> {
assertThat(l).startsWith("Using platform encoding (");
assertThat(l).endsWith("to copy filtered resources, i.e. build is platform dependent!");
});