diff options
author | Jean-Baptiste Lièvremont <jb.lievremont@gmail.com> | 2019-01-10 14:40:39 +0100 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2019-01-18 20:21:03 +0100 |
commit | c173166cd399c3d5b93381a0a98244c1baf73650 (patch) | |
tree | e59e780b907f9628b40a663816c8f9571d9cce5a /server/sonar-ce-task-projectanalysis | |
parent | 5c110414621fcfb2db1083f76ff09c4b6364757f (diff) | |
download | sonarqube-c173166cd399c3d5b93381a0a98244c1baf73650.tar.gz sonarqube-c173166cd399c3d5b93381a0a98244c1baf73650.zip |
SONARCLOUD-312 Use key instead of UUID to send downgrade feedback (#1140)
Diffstat (limited to 'server/sonar-ce-task-projectanalysis')
2 files changed, 3 insertions, 1 deletions
diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/VerifyBillingStep.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/VerifyBillingStep.java index aa2d15a9926..bcf7b193e59 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/VerifyBillingStep.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/VerifyBillingStep.java @@ -43,7 +43,7 @@ public class VerifyBillingStep implements ComputationStep { public void execute(ComputationStep.Context context) { try { Organization organization = analysisMetadata.getOrganization(); - BillingValidations.Organization billingOrganization = new BillingValidations.Organization(organization.getKey(), organization.getUuid()); + BillingValidations.Organization billingOrganization = new BillingValidations.Organization(organization.getKey(), organization.getUuid(), organization.getName()); billingValidations.checkBeforeProjectAnalysis(billingOrganization); } catch (BillingValidations.BillingValidationsException e) { throw MessageException.of(e.getMessage()); diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/VerifyBillingStepTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/VerifyBillingStepTest.java index 37dc38d55e1..0001f84f8f2 100644 --- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/VerifyBillingStepTest.java +++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/VerifyBillingStepTest.java @@ -76,6 +76,8 @@ public class VerifyBillingStepTest { verify(validations).checkBeforeProjectAnalysis(orgCaptor.capture()); BillingValidations.Organization calledOrg = orgCaptor.getValue(); assertThat(calledOrg.getKey()).isEqualTo(organization.getKey()); + assertThat(calledOrg.getUuid()).isEqualTo(organization.getUuid()); + assertThat(calledOrg.getName()).isEqualTo(organization.getName()); } } |