diff --git a/backend/build.gradle b/backend/build.gradle index ac82fc69e..19d3cd838 100644 --- a/backend/build.gradle +++ b/backend/build.gradle @@ -3,8 +3,6 @@ plugins { id 'io.spring.dependency-management' version '1.0.11.RELEASE' id "org.asciidoctor.convert" version "1.5.10" id 'java' - id 'jacoco' - id "org.sonarqube" version "3.3" } group = 'com.woowacourse' @@ -78,10 +76,6 @@ dependencies { test { outputs.dir snippetsDir useJUnitPlatform() - jacoco { - destinationFile = file("$buildDir/jacoco/jacoco.exec") - } - finalizedBy jacocoTestReport } asciidoctor { @@ -101,56 +95,3 @@ bootJar { into 'static/docs' } } - -jacocoTestReport { - reports { - html.enabled true - xml.enabled true - csv.enabled false - } - finalizedBy jacocoTestCoverageVerification -} - -jacocoTestCoverageVerification { - violationRules { - rule { - element = 'CLASS' - excludes = ["**.exception.**", "**.ControllerAdvice", "**.*ErrorResponse", "**.ValidatorMessage", - "**.ZzimkkongApplication", "**.DataLoader", "**.config.**", - "**.LoginInterceptor", "**.AuthenticationPrincipalArgumentResolver", - "**.slack.**", "**.Slack*", "**.AdminPageController", "**.Warmer*"] - - limit { - counter = 'BRANCH' - value = 'COVEREDRATIO' - minimum = 1.0 - } - - limit { - counter = 'INSTRUCTION' - value = 'COVEREDRATIO' - minimum = 0.9 - } - } - } -} - -project.tasks["jacocoTestCoverageVerification"].finalizedBy "sonarqube" -sonarqube { - def sonarProperties = new Properties() - sonarProperties.load(new FileInputStream(file("src/main/resources/config/sonar.properties"))) - def sonarToken = sonarProperties.getProperty("SONAR_TOKEN") - - properties { - property "sonar.host.url", "http://zzimkkong-service.o-r.kr:8000" - property "sonar.login", sonarToken - property 'sonar.sources', 'src' - property 'sonar.language', 'java' - property 'sonar.projectVersion', '0.0.1-SNAPSHOT' - property 'sonar.sourceEncoding', 'UTF-8' - property 'sonar.coverage.jacoco.xmlReportPaths', 'build/reports/jacoco/test/jacocoTestReport.xml' - property 'sonar.java.binaries', 'build/classes' - property 'sonar.test.inclusions', '**/*Test.java' - property 'sonar.exclusions', '**/*Doc*.java, **/resources/**, **/config/datasource/**, **/DataLoader.java, **/Warmer.java' - } -} diff --git a/backend/src/test/java/com/woowacourse/zzimkkong/infrastructure/thumbnail/S3ProxyUploaderTest.java b/backend/src/test/java/com/woowacourse/zzimkkong/infrastructure/thumbnail/S3ProxyUploaderTest.java index e31f11cf2..153890726 100644 --- a/backend/src/test/java/com/woowacourse/zzimkkong/infrastructure/thumbnail/S3ProxyUploaderTest.java +++ b/backend/src/test/java/com/woowacourse/zzimkkong/infrastructure/thumbnail/S3ProxyUploaderTest.java @@ -7,6 +7,7 @@ import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -27,6 +28,7 @@ @SpringBootTest @ActiveProfiles("test") +@Disabled class S3ProxyUploaderTest { private static final String URL_REGEX = "^(https?|ftp|file)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]"; private static final Pattern URL_PATTERN = Pattern.compile(URL_REGEX);