fix: various sonar service tests (#7836)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
This commit is contained in:
@@ -12,9 +12,7 @@ export const t = await createServiceTester()
|
||||
// https://docs.sonarqube.org/7.0/MetricDefinitions.html
|
||||
// https://sonarcloud.io/api/measures/component?componentKey=org.sonarsource.sonarqube:sonarqube&metricKeys=public_documented_api_density
|
||||
t.create('Documented API Density (not found)')
|
||||
.get(
|
||||
'/org.sonarsource.sonarqube%3Asonarqube.json?server=https://sonarcloud.io'
|
||||
)
|
||||
.get('/brave_brave-core.json?server=https://sonarcloud.io')
|
||||
.expectBadge({
|
||||
label: 'public documented api density',
|
||||
message: 'metric not found',
|
||||
|
||||
@@ -10,7 +10,7 @@ export const t = await createServiceTester()
|
||||
|
||||
t.create('Tech Debt')
|
||||
.get(
|
||||
'/tech_debt/org.sonarsource.sonarqube%3Asonarqube.json?server=https://sonarcloud.io'
|
||||
'/tech_debt/brave_brave-core.json?server=https://sonarcloud.io&sonarVersion=9.0'
|
||||
)
|
||||
.expectBadge({
|
||||
label: 'tech debt',
|
||||
@@ -18,9 +18,7 @@ t.create('Tech Debt')
|
||||
})
|
||||
|
||||
t.create('Tech Debt (branch)')
|
||||
.get(
|
||||
'/tech_debt/org.sonarsource.sonarqube%3Asonarqube/master.json?server=https://sonarcloud.io'
|
||||
)
|
||||
.get('/tech_debt/brave_brave-core/master.json?server=https://sonarcloud.io')
|
||||
.expectBadge({
|
||||
label: 'tech debt',
|
||||
message: isPercentage,
|
||||
|
||||
@@ -17,9 +17,7 @@ const isViolationsLongFormMetric = Joi.alternatives(
|
||||
|
||||
t.create('Violations')
|
||||
.timeout(10000)
|
||||
.get(
|
||||
'/violations/org.sonarsource.sonarqube%3Asonarqube.json?server=https://sonarcloud.io'
|
||||
)
|
||||
.get('/violations/brave_brave-core.json?server=https://sonarcloud.io')
|
||||
.expectBadge({
|
||||
label: 'violations',
|
||||
message: isMetric,
|
||||
@@ -27,9 +25,7 @@ t.create('Violations')
|
||||
|
||||
t.create('Violations (branch)')
|
||||
.timeout(10000)
|
||||
.get(
|
||||
'/violations/org.sonarsource.sonarqube%3Asonarqube/master.json?server=https://sonarcloud.io'
|
||||
)
|
||||
.get('/violations/brave_brave-core/master.json?server=https://sonarcloud.io')
|
||||
.expectBadge({
|
||||
label: 'violations',
|
||||
message: isMetric,
|
||||
@@ -67,7 +63,7 @@ t.create('Violations (legacy API supported)')
|
||||
t.create('Violations Long Format')
|
||||
.timeout(10000)
|
||||
.get(
|
||||
'/violations/org.sonarsource.sonarqube%3Asonarqube.json?server=https://sonarcloud.io&format=long'
|
||||
'/violations/brave_brave-core.json?server=https://sonarcloud.io&format=long'
|
||||
)
|
||||
.expectBadge({
|
||||
label: 'violations',
|
||||
@@ -126,9 +122,7 @@ t.create('Violations Long Format (legacy API supported)')
|
||||
|
||||
t.create('Blocker Violations')
|
||||
.timeout(10000)
|
||||
.get(
|
||||
'/blocker_violations/org.sonarsource.sonarqube%3Asonarqube.json?server=https://sonarcloud.io'
|
||||
)
|
||||
.get('/blocker_violations/brave_brave-core.json?server=https://sonarcloud.io')
|
||||
.expectBadge({
|
||||
label: 'blocker violations',
|
||||
message: isMetric,
|
||||
@@ -166,7 +160,7 @@ t.create('Blocker Violations (legacy API supported)')
|
||||
t.create('Critical Violations')
|
||||
.timeout(10000)
|
||||
.get(
|
||||
'/critical_violations/org.sonarsource.sonarqube%3Asonarqube.json?server=https://sonarcloud.io'
|
||||
'/critical_violations/brave_brave-core.json?server=https://sonarcloud.io'
|
||||
)
|
||||
.expectBadge({
|
||||
label: 'critical violations',
|
||||
|
||||
Reference in New Issue
Block a user