Skip to content

Commit 87e17f1

Browse files
committed
IJMP-1655 Sonarcloud testing
Signed-off-by: Uladzislau <[email protected]>
1 parent 00ed3ad commit 87e17f1

File tree

2 files changed

+3
-31
lines changed

2 files changed

+3
-31
lines changed

.github/actions/sonar/action.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ runs:
1717
run: >
1818
./gradlew --info sonar
1919
-Dorg.gradle.jvmargs="-XX:MaxMetaspaceSize=512m"
20-
-Dresults="build/reports/tests/test,build/test-results/test,build/reports/jacoco/test/html"
21-
-Psonar.host.url=$SONAR_HOST_URL -Dsonar.login=$SONAR_TOKEN
22-
-Dsonar.coverage.jacoco.xmlReportPaths="build/reports/jacoco.xml"
20+
-Dresults="build/reports/tests/test,build/test-results/test,build/reports/kover/html"
21+
-Psonar.host.url=$SONAR_HOST_URL -Dsonar.token=$SONAR_TOKEN
22+
-Dsonar.coverage.jacoco.xmlReportPaths="build/reports/kover/xml/report.xml"

src/test/kotlin/eu/ibagroup/formainframe/editor/EditorTestSpec.kt

-28
Original file line numberDiff line numberDiff line change
@@ -510,34 +510,6 @@ class EditorTestSpec : WithApplicationShouldSpec({
510510

511511
assertSoftly { descriptors?.isEmpty() shouldBe true }
512512
}
513-
should("check file when getting decoder error") {
514-
515-
text = "qwe��rty"
516-
517-
var decoderResultIsError = false
518-
var pointer = 0
519-
every { decoderMock.decode(any(), any(), any()) } answers {
520-
val back = secondArg<CharBuffer>()
521-
val str = text.substring(pointer)
522-
val pos = str.indexOfFirst { it !in 'A'..'z' }
523-
if (pos != -1) {
524-
decoderResultIsError = true
525-
pointer += pos
526-
back.position(pointer)
527-
pointer++
528-
} else {
529-
decoderResultIsError = false
530-
back.put(str)
531-
}
532-
decoderResultMock
533-
}
534-
every { decoderResultMock.isError } answers { decoderResultIsError }
535-
536-
val descriptors = lossyEncodingInspection.checkFile(psiFileMock, inspectionManagerMock, isOnTheFly)
537-
538-
assertSoftly { descriptors?.size shouldBe 1 }
539-
assertSoftly { descriptors?.get(0)?.textRangeInElement shouldBe TextRange(3, 5) }
540-
}
541513
should("check file where not all characters are decoded back") {
542514

543515
text = "qwerty."

0 commit comments

Comments
 (0)