Skip to content

Commit

Permalink
Fix tests 2
Browse files Browse the repository at this point in the history
  • Loading branch information
mstachniuk committed Dec 16, 2024
1 parent efc1fc0 commit 6a47ece
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
4 changes: 3 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ minimal-json = "0.9.5"
mockito-core = "5.13.0"
assertj-core = "3.26.3"
junit-jupiter = "5.11.0"
# slf4j is provided by SQ, SC or SL, should be aligned with sonar-plugin-api in integration tests
slf4j-api = "1.7.30"

[libraries]
sonar-plugin-api = { group = "org.sonarsource.api.plugin", name = "sonar-plugin-api", version.ref = "plugin-api" }
Expand All @@ -20,7 +22,6 @@ checkstyle-import = { group = "org.sonarsource.slang", name = "checkstyle-import
minimal-json = { group = "com.eclipsesource.minimal-json", name = "minimal-json", version.ref = "minimal-json" }
sonar-plugin-api-test-fixtures = { group = "org.sonarsource.api.plugin", name = "sonar-plugin-api-test-fixtures", version.ref = "plugin-api" }
sonar-plugin-api-impl = { group = "org.sonarsource.sonarqube", name = "sonar-plugin-api-impl", version.ref = "sonarqube" }
sonar-orchestrator = { group = "org.sonarsource.orchestrator", name = "sonar-orchestrator", version.ref = "orchestrator" }
sonar-orchestrator-junit5 = { group = "org.sonarsource.orchestrator", name = "sonar-orchestrator-junit5", version.ref = "orchestrator" }
sonarlint-core = { group = "org.sonarsource.sonarlint.core", name = "sonarlint-core", version.ref = "sonarlint" }
sonar-ws = { group = "org.sonarsource.sonarqube", name = "sonar-ws", version.ref = "sonarqube" }
Expand All @@ -30,3 +31,4 @@ mockito-core = { group = "org.mockito", name = "mockito-core", version.ref = "mo
assertj-core = { group = "org.assertj", name = "assertj-core", version.ref = "assertj-core" }
junit-jupiter-api = { group = "org.junit.jupiter", name = "junit-jupiter-api", version.ref = "junit-jupiter" }
junit-jupiter-engine = { group = "org.junit.jupiter", name = "junit-jupiter-engine", version.ref = "junit-jupiter" }
slf4j-api = { group = "org.slf4j", name = "slf4j-api", version.ref = "slf4j-api" }
12 changes: 9 additions & 3 deletions its/plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,24 @@ plugins {
}

dependencies {
"integrationTestImplementation"(libs.slf4j.api)
"integrationTestImplementation"(project(":sonar-go-plugin", configuration = "shadow"))
"integrationTestImplementation"(libs.sonar.analyzer.commons)
"integrationTestImplementation"(libs.sonar.ws)
"integrationTestImplementation"(libs.assertj.core)
"integrationTestImplementation"(libs.sonarlint.core)
"integrationTestImplementation"(libs.sonar.orchestrator)
"integrationTestImplementation"(libs.sonar.orchestrator.junit5)
"integrationTestImplementation"(libs.sonar.orchestrator.junit5) {
exclude("ch.qos.logback", "logback-classic")
exclude("org.slf4j", "slf4j-api")
exclude("org.slf4j", "jcl-over-slf4j")
exclude("org.slf4j", "log4j-over-slf4j")
}
"integrationTestImplementation"(libs.junit.jupiter.api)

"integrationTestRuntimeOnly"(libs.junit.jupiter.engine)
}

sonarqube.isSkipProject = true
sonar.isSkipProject = true

integrationTest {
testSources.set(file("projects"))
Expand Down
12 changes: 9 additions & 3 deletions its/ruling/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,22 @@ plugins {
}

dependencies {
"integrationTestImplementation"(libs.slf4j.api)
"integrationTestImplementation"(libs.sonar.analyzer.commons)
"integrationTestImplementation"(libs.assertj.core)
"integrationTestImplementation"(libs.sonar.orchestrator)
"integrationTestImplementation"(libs.sonar.orchestrator.junit5)
"integrationTestImplementation"(libs.sonar.orchestrator.junit5) {
exclude("ch.qos.logback", "logback-classic")
exclude("org.slf4j", "slf4j-api")
exclude("org.slf4j", "jcl-over-slf4j")
exclude("org.slf4j", "log4j-over-slf4j")
}
"integrationTestImplementation"(libs.junit.jupiter.api)

"integrationTestRuntimeOnly"(project(":sonar-go-plugin", configuration = "shadow"))
"integrationTestRuntimeOnly"(libs.junit.jupiter.engine)
}

sonarqube.isSkipProject = true
sonar.isSkipProject = true

integrationTest {
testSources.set(rootProject.file("its/sources"))
Expand Down

0 comments on commit 6a47ece

Please sign in to comment.