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://docs.sonarqube.org/7.0/MetricDefinitions.html
|
||||||
// https://sonarcloud.io/api/measures/component?componentKey=org.sonarsource.sonarqube:sonarqube&metricKeys=public_documented_api_density
|
// https://sonarcloud.io/api/measures/component?componentKey=org.sonarsource.sonarqube:sonarqube&metricKeys=public_documented_api_density
|
||||||
t.create('Documented API Density (not found)')
|
t.create('Documented API Density (not found)')
|
||||||
.get(
|
.get('/brave_brave-core.json?server=https://sonarcloud.io')
|
||||||
'/org.sonarsource.sonarqube%3Asonarqube.json?server=https://sonarcloud.io'
|
|
||||||
)
|
|
||||||
.expectBadge({
|
.expectBadge({
|
||||||
label: 'public documented api density',
|
label: 'public documented api density',
|
||||||
message: 'metric not found',
|
message: 'metric not found',
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export const t = await createServiceTester()
|
|||||||
|
|
||||||
t.create('Tech Debt')
|
t.create('Tech Debt')
|
||||||
.get(
|
.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({
|
.expectBadge({
|
||||||
label: 'tech debt',
|
label: 'tech debt',
|
||||||
@@ -18,9 +18,7 @@ t.create('Tech Debt')
|
|||||||
})
|
})
|
||||||
|
|
||||||
t.create('Tech Debt (branch)')
|
t.create('Tech Debt (branch)')
|
||||||
.get(
|
.get('/tech_debt/brave_brave-core/master.json?server=https://sonarcloud.io')
|
||||||
'/tech_debt/org.sonarsource.sonarqube%3Asonarqube/master.json?server=https://sonarcloud.io'
|
|
||||||
)
|
|
||||||
.expectBadge({
|
.expectBadge({
|
||||||
label: 'tech debt',
|
label: 'tech debt',
|
||||||
message: isPercentage,
|
message: isPercentage,
|
||||||
|
|||||||
@@ -17,9 +17,7 @@ const isViolationsLongFormMetric = Joi.alternatives(
|
|||||||
|
|
||||||
t.create('Violations')
|
t.create('Violations')
|
||||||
.timeout(10000)
|
.timeout(10000)
|
||||||
.get(
|
.get('/violations/brave_brave-core.json?server=https://sonarcloud.io')
|
||||||
'/violations/org.sonarsource.sonarqube%3Asonarqube.json?server=https://sonarcloud.io'
|
|
||||||
)
|
|
||||||
.expectBadge({
|
.expectBadge({
|
||||||
label: 'violations',
|
label: 'violations',
|
||||||
message: isMetric,
|
message: isMetric,
|
||||||
@@ -27,9 +25,7 @@ t.create('Violations')
|
|||||||
|
|
||||||
t.create('Violations (branch)')
|
t.create('Violations (branch)')
|
||||||
.timeout(10000)
|
.timeout(10000)
|
||||||
.get(
|
.get('/violations/brave_brave-core/master.json?server=https://sonarcloud.io')
|
||||||
'/violations/org.sonarsource.sonarqube%3Asonarqube/master.json?server=https://sonarcloud.io'
|
|
||||||
)
|
|
||||||
.expectBadge({
|
.expectBadge({
|
||||||
label: 'violations',
|
label: 'violations',
|
||||||
message: isMetric,
|
message: isMetric,
|
||||||
@@ -67,7 +63,7 @@ t.create('Violations (legacy API supported)')
|
|||||||
t.create('Violations Long Format')
|
t.create('Violations Long Format')
|
||||||
.timeout(10000)
|
.timeout(10000)
|
||||||
.get(
|
.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({
|
.expectBadge({
|
||||||
label: 'violations',
|
label: 'violations',
|
||||||
@@ -126,9 +122,7 @@ t.create('Violations Long Format (legacy API supported)')
|
|||||||
|
|
||||||
t.create('Blocker Violations')
|
t.create('Blocker Violations')
|
||||||
.timeout(10000)
|
.timeout(10000)
|
||||||
.get(
|
.get('/blocker_violations/brave_brave-core.json?server=https://sonarcloud.io')
|
||||||
'/blocker_violations/org.sonarsource.sonarqube%3Asonarqube.json?server=https://sonarcloud.io'
|
|
||||||
)
|
|
||||||
.expectBadge({
|
.expectBadge({
|
||||||
label: 'blocker violations',
|
label: 'blocker violations',
|
||||||
message: isMetric,
|
message: isMetric,
|
||||||
@@ -166,7 +160,7 @@ t.create('Blocker Violations (legacy API supported)')
|
|||||||
t.create('Critical Violations')
|
t.create('Critical Violations')
|
||||||
.timeout(10000)
|
.timeout(10000)
|
||||||
.get(
|
.get(
|
||||||
'/critical_violations/org.sonarsource.sonarqube%3Asonarqube.json?server=https://sonarcloud.io'
|
'/critical_violations/brave_brave-core.json?server=https://sonarcloud.io'
|
||||||
)
|
)
|
||||||
.expectBadge({
|
.expectBadge({
|
||||||
label: 'critical violations',
|
label: 'critical violations',
|
||||||
|
|||||||
Reference in New Issue
Block a user