diff options
author | Anita Stanisz <106669481+anita-stanisz-sonarsource@users.noreply.github.com> | 2024-11-22 11:08:07 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-11-29 20:03:07 +0000 |
commit | dfe8c0a21bd4b817b18a212ee4f59ed4ad0e05a7 (patch) | |
tree | bd40e0b222a3a13bea83bdffe4dd68930bd65c01 /server/sonar-webserver-webapi | |
parent | ef4ed37bdfa1b2591a6d1b1df259384bf0270713 (diff) | |
download | sonarqube-dfe8c0a21bd4b817b18a212ee4f59ed4ad0e05a7.tar.gz sonarqube-dfe8c0a21bd4b817b18a212ee4f59ed4ad0e05a7.zip |
SONAR-23619 Rename ai_code_assurance_column (#12320)
Diffstat (limited to 'server/sonar-webserver-webapi')
5 files changed, 10 insertions, 10 deletions
diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ai/code/assurance/AiCodeAssuranceVerifierTest.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ai/code/assurance/AiCodeAssuranceVerifierTest.java index 4225bca5012..697ac4dd2a1 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ai/code/assurance/AiCodeAssuranceVerifierTest.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ai/code/assurance/AiCodeAssuranceVerifierTest.java @@ -56,9 +56,9 @@ class AiCodeAssuranceVerifierTest { when(platformEditionProvider.get()).thenReturn(Optional.of(edition)); underTest = new AiCodeAssuranceVerifier(platformEditionProvider); - when(projectDto.getAiCodeAssurance()).thenReturn(aiCodeAssuredOnProject); + when(projectDto.getContainsAiCode()).thenReturn(aiCodeAssuredOnProject); - assertThat(underTest.isAiCodeAssured(projectDto.getAiCodeAssurance())).isEqualTo(expected); + assertThat(underTest.isAiCodeAssured(projectDto.getContainsAiCode())).isEqualTo(expected); assertThat(underTest.isAiCodeAssured(projectDto)).isEqualTo(expected); } -}
\ No newline at end of file +} diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ws/SearchProjectsActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ws/SearchProjectsActionIT.java index 161b5d2f7e7..18442eea290 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ws/SearchProjectsActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ws/SearchProjectsActionIT.java @@ -1382,7 +1382,7 @@ public class SearchProjectsActionIT { when(aiCodeAssuranceVerifier.isAiCodeAssured(any())).thenReturn(aiCodeAssured); userSession.logIn(); ProjectDto project = db.components().insertPublicProject(componentDto -> componentDto.setName("proj_A"), - projectDto -> projectDto.setAiCodeAssurance(true)).getProjectDto(); + projectDto -> projectDto.setContainsAiCode(true)).getProjectDto(); authorizationIndexerTester.allowOnlyAnyone(project); index(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/SearchActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/SearchActionIT.java index a28db92b482..efe0c0a9cff 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/SearchActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/SearchActionIT.java @@ -292,12 +292,12 @@ public class SearchActionIT { public void return_disabled_property_in_projects() { QualityGateDto qualityGate = db.qualityGates().insertQualityGate(); ProjectDto project1 = db.components().insertPublicProject(componentDto -> componentDto.setName("proj1"), - projectDto -> projectDto.setAiCodeAssurance(true)).getProjectDto(); + projectDto -> projectDto.setContainsAiCode(true)).getProjectDto(); ProjectDto project2 = db.components().insertPublicProject(componentDto -> componentDto.setName("proj2"), - projectDto -> projectDto.setAiCodeAssurance(false)).getProjectDto(); + projectDto -> projectDto.setContainsAiCode(false)).getProjectDto(); - when(aiCodeAssuranceVerifier.isAiCodeAssured(project1.getAiCodeAssurance())).thenReturn(true); - when(aiCodeAssuranceVerifier.isAiCodeAssured(project2.getAiCodeAssurance())).thenReturn(false); + when(aiCodeAssuranceVerifier.isAiCodeAssured(project1.getContainsAiCode())).thenReturn(true); + when(aiCodeAssuranceVerifier.isAiCodeAssured(project2.getContainsAiCode())).thenReturn(false); SearchResponse response = ws.newRequest() .setParam(PARAM_GATE_NAME, valueOf(qualityGate.getName())) diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/ai/code/assurance/AiCodeAssuranceVerifier.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/ai/code/assurance/AiCodeAssuranceVerifier.java index 437c6e6dc20..7e1d40192cd 100644 --- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/ai/code/assurance/AiCodeAssuranceVerifier.java +++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/ai/code/assurance/AiCodeAssuranceVerifier.java @@ -38,7 +38,7 @@ public class AiCodeAssuranceVerifier { public boolean isAiCodeAssured(ProjectDto projectDto) { - return isAiCodeAssured(projectDto.getAiCodeAssurance()); + return isAiCodeAssured(projectDto.getContainsAiCode()); } public boolean isAiCodeAssured(boolean projectAiCodeAssurance) { diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/qualitygate/ws/SearchAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/qualitygate/ws/SearchAction.java index 150bbda8bfb..4b0ba62e1b7 100644 --- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/qualitygate/ws/SearchAction.java +++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/qualitygate/ws/SearchAction.java @@ -138,7 +138,7 @@ public class SearchAction implements QualityGatesWsAction { .setName(project.getName()) .setKey(project.getKey()) .setSelected(project.getGateUuid() != null) - .setIsAiCodeAssured(aiCodeAssuranceVerifier.isAiCodeAssured(project.getAiCodeAssurance())); + .setIsAiCodeAssured(aiCodeAssuranceVerifier.isAiCodeAssured(project.getContainsAiCode())); } writeProtobuf(createResponse.build(), request, response); |