aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-telemetry/src
diff options
context:
space:
mode:
authorLéo Geoffroy <leo.geoffroy@sonarsource.com>2024-10-25 09:46:34 +0200
committersonartech <sonartech@sonarsource.com>2024-11-05 20:03:01 +0000
commit900f99653d2e5cc0679fd6cb246e9f912195823d (patch)
tree54152eec248af2e3034808e0c58211ec12fc6e1d /server/sonar-telemetry/src
parent77a5e05ed4d2ff936dca4752f6d6dffb7e38b6c6 (diff)
downloadsonarqube-900f99653d2e5cc0679fd6cb246e9f912195823d.tar.gz
sonarqube-900f99653d2e5cc0679fd6cb246e9f912195823d.zip
Add new fields hasStandardConditions and hasMQRConditions in qualitgates/list endpoint and checks
Diffstat (limited to 'server/sonar-telemetry/src')
-rw-r--r--server/sonar-telemetry/src/it/java/org/sonar/telemetry/legacy/TelemetryDataLoaderImplIT.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/server/sonar-telemetry/src/it/java/org/sonar/telemetry/legacy/TelemetryDataLoaderImplIT.java b/server/sonar-telemetry/src/it/java/org/sonar/telemetry/legacy/TelemetryDataLoaderImplIT.java
index e4f21c21a6d..21da1debbaf 100644
--- a/server/sonar-telemetry/src/it/java/org/sonar/telemetry/legacy/TelemetryDataLoaderImplIT.java
+++ b/server/sonar-telemetry/src/it/java/org/sonar/telemetry/legacy/TelemetryDataLoaderImplIT.java
@@ -130,10 +130,12 @@ class TelemetryDataLoaderImplIT {
private final AiCodeAssuranceVerifier aiCodeAssuranceVerifier = mock(AiCodeAssuranceVerifier.class);
private final TelemetryDataLoader communityUnderTest = new TelemetryDataLoaderImpl(server, db.getDbClient(), pluginRepository, editionProvider,
- internalProperties, configuration, containerSupport, qualityGateCaycChecker, qualityGateFinder, managedInstanceService, cloudUsageDataProvider, qualityProfileDataProvider, aiCodeAssuranceVerifier,
+ internalProperties, configuration, containerSupport, qualityGateCaycChecker, qualityGateFinder, managedInstanceService, cloudUsageDataProvider, qualityProfileDataProvider,
+ aiCodeAssuranceVerifier,
projectLocDistributionDataProvider);
private final TelemetryDataLoader commercialUnderTest = new TelemetryDataLoaderImpl(server, db.getDbClient(), pluginRepository, editionProvider,
- internalProperties, configuration, containerSupport, qualityGateCaycChecker, qualityGateFinder, managedInstanceService, cloudUsageDataProvider, qualityProfileDataProvider, aiCodeAssuranceVerifier,
+ internalProperties, configuration, containerSupport, qualityGateCaycChecker, qualityGateFinder, managedInstanceService, cloudUsageDataProvider, qualityProfileDataProvider,
+ aiCodeAssuranceVerifier,
projectLocDistributionDataProvider);
private QualityGateDto builtInDefaultQualityGate;
@@ -147,7 +149,7 @@ class TelemetryDataLoaderImplIT {
void setUpBuiltInQualityGate() {
String builtInQgName = "Sonar way";
builtInDefaultQualityGate = db.qualityGates().insertQualityGate(qg -> qg.setName(builtInQgName).setBuiltIn(true));
- when(qualityGateCaycChecker.checkCaycCompliant(any(), any())).thenReturn(NON_COMPLIANT);
+ when(qualityGateCaycChecker.checkCaycCompliant(any(), any(String.class))).thenReturn(NON_COMPLIANT);
db.qualityGates().setDefaultQualityGate(builtInDefaultQualityGate);
bugsDto = db.measures().insertMetric(m -> m.setKey(BUGS_KEY));
@@ -538,7 +540,8 @@ class TelemetryDataLoaderImplIT {
@ParameterizedTest
@MethodSource("values")
void load_shouldContainCorrectAiCodeAssuranceField(boolean expected) {
- ProjectDto project1 = db.components().insertPublicProject(componentDto -> {},
+ ProjectDto project1 = db.components().insertPublicProject(componentDto -> {
+ },
projectDto -> projectDto.setAiCodeAssurance(expected)).getProjectDto();
when(aiCodeAssuranceVerifier.isAiCodeAssured(project1.getAiCodeAssurance())).thenReturn(expected);
@@ -752,14 +755,12 @@ class TelemetryDataLoaderImplIT {
Arguments.of(true, "scim"),
Arguments.of(true, "github"),
Arguments.of(true, "gitlab"),
- Arguments.of(false, null)
- );
+ Arguments.of(false, null));
}
private static Stream<Arguments> values() {
return Stream.of(
Arguments.of(false),
- Arguments.of(true)
- );
+ Arguments.of(true));
}
}