-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(deps): update dependencies (#603)
* fix(deps): update dependencies * fix(kafka): Add sslbundle to kafka config, disable pitest verbose --------- Co-authored-by: juancgalvis <8420868+juancgalvis@users.noreply.github.com>
- Loading branch information
1 parent
b81e5f6
commit 71e568a
Showing
9 changed files
with
364 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...ain/java/co/com/bancolombia/factory/upgrades/actions/UpgradeY2024M12D18PitestVerbose.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package co.com.bancolombia.factory.upgrades.actions; | ||
|
||
import static co.com.bancolombia.Constants.MainFiles.MAIN_GRADLE; | ||
|
||
import co.com.bancolombia.factory.ModuleBuilder; | ||
import co.com.bancolombia.factory.upgrades.UpdateUtils; | ||
import co.com.bancolombia.factory.upgrades.UpgradeAction; | ||
import lombok.SneakyThrows; | ||
|
||
public class UpgradeY2024M12D18PitestVerbose implements UpgradeAction { | ||
|
||
@Override | ||
@SneakyThrows | ||
public boolean up(ModuleBuilder builder) { | ||
return builder.updateFile( | ||
MAIN_GRADLE, content -> UpdateUtils.replace(content, "verbose = true", "verbose = false")); | ||
} | ||
|
||
@Override | ||
public String name() { | ||
return "3.20.5->3.20.6"; | ||
} | ||
|
||
@Override | ||
public String description() { | ||
return "Set verbose to false in pitest"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
...java/co/com/bancolombia/factory/upgrades/actions/UpgradeY2024M12D18PitestVerboseTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
package co.com.bancolombia.factory.upgrades.actions; | ||
|
||
import static co.com.bancolombia.Constants.MainFiles.MAIN_GRADLE; | ||
import static org.junit.jupiter.api.Assertions.assertNotNull; | ||
import static org.junit.jupiter.api.Assertions.assertTrue; | ||
import static org.mockito.Mockito.spy; | ||
import static org.mockito.Mockito.verify; | ||
import static org.mockito.Mockito.when; | ||
|
||
import co.com.bancolombia.factory.ModuleBuilder; | ||
import co.com.bancolombia.factory.upgrades.UpgradeAction; | ||
import co.com.bancolombia.utils.FileUtils; | ||
import com.github.mustachejava.resolver.DefaultResolver; | ||
import java.io.IOException; | ||
import java.nio.file.Files; | ||
import org.gradle.api.Project; | ||
import org.gradle.api.logging.Logger; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.extension.ExtendWith; | ||
import org.mockito.Mock; | ||
import org.mockito.junit.jupiter.MockitoExtension; | ||
|
||
@ExtendWith(MockitoExtension.class) | ||
class UpgradeY2024M12D18PitestVerboseTest { | ||
|
||
@Mock private Project project; | ||
@Mock private Logger logger; | ||
|
||
private ModuleBuilder builder; | ||
private UpgradeAction updater; | ||
|
||
@BeforeEach | ||
public void setup() throws IOException { | ||
when(project.getName()).thenReturn("UtilsTest"); | ||
when(project.getLogger()).thenReturn(logger); | ||
when(project.getProjectDir()).thenReturn(Files.createTempDirectory("sample").toFile()); | ||
|
||
builder = spy(new ModuleBuilder(project)); | ||
updater = new UpgradeY2024M12D18PitestVerbose(); | ||
|
||
assertNotNull(updater.name()); | ||
assertNotNull(updater.description()); | ||
} | ||
|
||
@Test | ||
void shouldApplyUpdate() throws IOException { | ||
DefaultResolver resolver = new DefaultResolver(); | ||
// Arrange | ||
builder.addFile( | ||
MAIN_GRADLE, FileUtils.getResourceAsString(resolver, "pitest-verbose/main-before.txt")); | ||
// Act | ||
boolean applied = updater.up(builder); | ||
// Assert | ||
assertTrue(applied); | ||
verify(builder) | ||
.addFile( | ||
MAIN_GRADLE, FileUtils.getResourceAsString(resolver, "pitest-verbose/main-after.txt")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
apply plugin: 'info.solidsoft.pitest.aggregator' | ||
|
||
allprojects { | ||
repositories { | ||
mavenCentral() | ||
maven { url "https://repo.spring.io/snapshot" } | ||
maven { url "https://repo.spring.io/milestone" } | ||
} | ||
} | ||
|
||
subprojects { | ||
apply plugin: 'info.solidsoft.pitest' | ||
apply plugin: 'java' | ||
apply plugin: 'jacoco' | ||
apply plugin: 'io.spring.dependency-management' | ||
|
||
compileJava.dependsOn validateStructure | ||
java { | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
} | ||
|
||
dependencies { | ||
implementation platform('software.amazon.awssdk:bom:2.29.15') | ||
implementation 'io.projectreactor:reactor-core' | ||
implementation 'io.projectreactor.addons:reactor-extra' | ||
|
||
testImplementation 'io.projectreactor.tools:blockhound-junit-platform:1.0.10.RELEASE' | ||
testRuntimeOnly 'org.junit.platform:junit-platform-launcher' | ||
|
||
testImplementation 'io.projectreactor:reactor-test' | ||
testImplementation 'org.springframework.boot:spring-boot-starter-test' | ||
compileOnly "org.projectlombok:lombok:${lombokVersion}" | ||
annotationProcessor "org.projectlombok:lombok:${lombokVersion}" | ||
testCompileOnly "org.projectlombok:lombok:${lombokVersion}" | ||
testAnnotationProcessor "org.projectlombok:lombok:${lombokVersion}" | ||
implementation platform("org.springframework.boot:spring-boot-dependencies:${springBootVersion}") | ||
} | ||
|
||
tasks.withType(Test).configureEach { | ||
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_13)) { | ||
jvmArgs += [ | ||
"-XX:+AllowRedefinitionToAddDeleteMethods" | ||
] | ||
} | ||
} | ||
|
||
test.finalizedBy(project.tasks.jacocoTestReport) | ||
|
||
pitest { | ||
targetClasses = ['your.package.*'] | ||
excludedClasses = [] | ||
excludedTestClasses = [] | ||
pitestVersion = '1.16.1' | ||
verbose = false | ||
outputFormats = ['XML', 'HTML'] | ||
threads = 8 | ||
exportLineCoverage = true | ||
timestampedReports = false | ||
//mutators = ['STRONGER', 'DEFAULTS'] | ||
fileExtensionsToFilter.addAll('xml', 'orbit') | ||
junit5PluginVersion = '1.2.1' | ||
failWhenNoMutations = false | ||
jvmArgs = ["-XX:+AllowRedefinitionToAddDeleteMethods"] | ||
} | ||
|
||
jacocoTestReport { | ||
dependsOn test, 'pitest' | ||
reports { | ||
xml.setRequired true | ||
xml.setOutputLocation layout.buildDirectory.file("reports/jacoco.xml") | ||
csv.setRequired false | ||
html.setOutputLocation layout.buildDirectory.dir("reports/jacocoHtml") | ||
} | ||
} | ||
|
||
} | ||
|
||
jacoco { | ||
toolVersion = "${jacocoVersion}" | ||
reportsDirectory.set(layout.buildDirectory.dir("reports")) | ||
} | ||
|
||
tasks.register('jacocoMergedReport', JacocoReport) { | ||
dependsOn = [test, subprojects.jacocoTestReport, pitestReportAggregate] | ||
additionalSourceDirs.setFrom files(subprojects.sourceSets.main.allSource.srcDirs) | ||
sourceDirectories.setFrom files(subprojects.sourceSets.main.allSource.srcDirs) | ||
classDirectories.setFrom files(subprojects.sourceSets.main.output) | ||
executionData.setFrom project.fileTree(dir: '.', include: '**/build/jacoco/test.exec') | ||
reports { | ||
xml.setRequired true | ||
csv.setRequired false | ||
html.setRequired true | ||
} | ||
} | ||
|
||
tasks.withType(JavaCompile).configureEach { | ||
options.compilerArgs = [ | ||
'-Amapstruct.suppressGeneratorTimestamp=true' | ||
] | ||
} | ||
|
||
|
||
pitestReportAggregate { | ||
doLast { | ||
def reportDir = layout.buildDirectory.dir("reports/pitest").get().asFile | ||
def consolidatedReport = new File(reportDir, 'mutations.xml') | ||
consolidatedReport.withWriter { writer -> | ||
writer.write("<mutations>\n") | ||
subprojects.each { subproject -> | ||
def xmlReport = subproject.layout.buildDirectory.file("reports/pitest/mutations.xml").get().asFile | ||
if (xmlReport.exists()) { | ||
def xmlContent = xmlReport.text | ||
xmlContent = xmlContent.replaceAll("<\\?xml[^>]*>", "") | ||
xmlContent = xmlContent.replaceAll("</?mutations( partial=\"true\")?>", "") | ||
writer.write(xmlContent.trim() + "\n") | ||
} | ||
} | ||
writer.write("</mutations>") | ||
} | ||
} | ||
} | ||
|
||
tasks.named('wrapper') { | ||
gradleVersion = '8.10.2' | ||
} |
Oops, something went wrong.