Skip to content

Commit

Permalink
Update test expectations
Browse files Browse the repository at this point in the history
  • Loading branch information
sambsnyd committed Mar 19, 2024
1 parent cc4b908 commit 1340643
Showing 1 changed file with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,27 +155,33 @@ void switchArtifactIdAndUpdateVersionNumber() {
plugins {
id 'java'
}
repositories {
mavenCentral()
}
dependencies {
runtimeOnly 'mysql:mysql-connector-java:8.0.30'
}
tasks.withType(Test).configureEach {
useJUnitPlatform()
}
""",
"""
plugins {
id 'java'
}
repositories {
mavenCentral()
}
dependencies {
runtimeOnly 'com.mysql:mysql-connector-j:8.0.33'
}
tasks.withType(Test).configureEach {
useJUnitPlatform()
}
""")
);
}
Expand All @@ -199,6 +205,9 @@ void doNotPinWhenNotVersioned() {
dependencies {
runtimeOnly 'mysql:mysql-connector-java'
}
tasks.withType(Test).configureEach {
useJUnitPlatform()
}
""", spec -> spec.after(gradle -> {
Matcher version = Pattern.compile("2\\.5\\.\\d+").matcher(gradle);
assertThat(version.find()).describedAs("Expected 2.5.x in %s", gradle).isTrue();
Expand All @@ -217,6 +226,9 @@ void doNotPinWhenNotVersioned() {
dependencies {
runtimeOnly 'com.mysql:mysql-connector-j'
}
tasks.withType(Test).configureEach {
useJUnitPlatform()
}
""".formatted(version.group());
})
)
Expand Down

0 comments on commit 1340643

Please sign in to comment.