-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
79d4975
commit cf0c140
Showing
6 changed files
with
48 additions
and
41 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,13 +22,15 @@ jobs: | |
- name: Grant Execute Permission For Gradlew | ||
run: chmod +x gradlew | ||
- name: Test With Gradle | ||
run: ./gradlew test jacocoTestReport | ||
- name: Add coverage to PR | ||
uses: madrapps/[email protected] | ||
run: ./gradlew test koverXmlReport | ||
- name: Add coverage report to PR | ||
id: kover | ||
uses: mi-kas/kover-report@v1 | ||
with: | ||
paths: server/build/reports/jacoco/test/jacocoTestReport.xml | ||
path: ${{ github.workspace }}/build/reports/kover/report.xml | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
min-coverage-overall: 70 | ||
min-coverage-changed-files: 70 | ||
title: Code Coverage | ||
update-comment: true | ||
title: "Coverage Report" | ||
min-coverage-overall: 10 | ||
min-coverage-changed-files: 10 | ||
coverage-counter-type: LINE |
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
28 changes: 28 additions & 0 deletions
28
server/src/test/kotlin/com/fone/home/presentation/HomeControllerTest.kt
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 com.fone.home.presentation | ||
|
||
import com.fone.common.CommonUserCallApi | ||
import com.fone.common.CustomDescribeSpec | ||
import com.fone.common.IntegrationTest | ||
import com.fone.common.doGet | ||
import org.springframework.test.web.reactive.server.WebTestClient | ||
|
||
@IntegrationTest | ||
class HomeControllerTest(client: WebTestClient) : CustomDescribeSpec() { | ||
|
||
private val retrieveUrl = "/api/v1/homes" | ||
|
||
init { | ||
val (accessToken, _) = CommonUserCallApi.getAccessToken(client) | ||
|
||
describe("#retrieveHome") { | ||
context("when retrieve home") { | ||
it("should return home info") { | ||
client.doGet(retrieveUrl, accessToken).expectStatus().isOk.expectBody() | ||
.consumeWith { println(it) } | ||
.jsonPath("$.result") | ||
.isEqualTo("SUCCESS") | ||
} | ||
} | ||
} | ||
} | ||
} |
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