This repository has been archived by the owner on May 25, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(scan): output the test nodes json, feature analyser can take it …
…as the input (contract test)
- Loading branch information
Andong Liao
committed
Apr 23, 2022
1 parent
46b214f
commit 406c3e7
Showing
6 changed files
with
74 additions
and
0 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
structs_*.json |
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
16 changes: 16 additions & 0 deletions
16
analyser_sourcecode/lang_kotlin/src/test/resources/spring/QualityGateClientImpl.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,16 @@ | ||
package kotlin | ||
|
||
import com.thoughtworks.archguard.report.domain.qualitygate.CouplingQualityGate | ||
import com.thoughtworks.archguard.report.domain.qualitygate.QualityGateClient | ||
import org.springframework.beans.factory.annotation.Value | ||
import org.springframework.stereotype.Component | ||
import org.springframework.web.client.RestTemplate | ||
|
||
|
||
@Component | ||
class QualityGateClientImpl(@Value("\${client.host}") val baseUrl: String) : QualityGateClient { | ||
override fun getQualityGate(qualityGateName: String): CouplingQualityGate { | ||
val couplingQualityGate = RestTemplate().getForObject("$baseUrl/api/quality-gate-profile/$qualityGateName", CouplingQualityGate::class.java) | ||
return couplingQualityGate ?: CouplingQualityGate(null, qualityGateName, emptyList(), null, null) | ||
} | ||
} |
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 @@ | ||
structs_*.json |
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