diff options
author | Dejan Milisavljevic <dejan.milisavljevic@sonarsource.com> | 2024-11-21 08:05:01 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-11-21 20:02:47 +0000 |
commit | 865b3112294654f3f3bbf1fd25d7520a397bbf30 (patch) | |
tree | 061773bb8be848033f2487ceb0f177a30c2410d1 /server/sonar-webserver-common | |
parent | fbb315f1aafc302a512ea3b70f06c6dac3a4e3b9 (diff) | |
download | sonarqube-865b3112294654f3f3bbf1fd25d7520a397bbf30.tar.gz sonarqube-865b3112294654f3f3bbf1fd25d7520a397bbf30.zip |
SONAR-23341 Security report data are based on Security impact when in MQR mode
Diffstat (limited to 'server/sonar-webserver-common')
-rw-r--r-- | server/sonar-webserver-common/src/it/java/org/sonar/server/common/rule/RuleCreatorIT.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/server/sonar-webserver-common/src/it/java/org/sonar/server/common/rule/RuleCreatorIT.java b/server/sonar-webserver-common/src/it/java/org/sonar/server/common/rule/RuleCreatorIT.java index dea97caa528..3634ee7c22c 100644 --- a/server/sonar-webserver-common/src/it/java/org/sonar/server/common/rule/RuleCreatorIT.java +++ b/server/sonar-webserver-common/src/it/java/org/sonar/server/common/rule/RuleCreatorIT.java @@ -29,6 +29,8 @@ import java.util.concurrent.atomic.AtomicReference; import org.assertj.core.api.Fail; import org.junit.Rule; import org.junit.Test; +import org.mockito.Mockito; +import org.sonar.api.config.Configuration; import org.sonar.api.impl.utils.TestSystem2; import org.sonar.api.rule.RuleKey; import org.sonar.api.rule.RuleStatus; @@ -61,6 +63,7 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.assertj.core.groups.Tuple.tuple; import static org.junit.Assert.fail; +import static org.mockito.Mockito.mock; import static org.sonar.api.issue.impact.Severity.HIGH; import static org.sonar.api.issue.impact.Severity.LOW; import static org.sonar.api.issue.impact.Severity.MEDIUM; @@ -84,7 +87,8 @@ public class RuleCreatorIT { @Rule public EsTester es = EsTester.create(); - private final RuleIndex ruleIndex = new RuleIndex(es.client(), system2); + private final Configuration config = mock(Configuration.class); + private final RuleIndex ruleIndex = new RuleIndex(es.client(), system2, config); private final RuleIndexer ruleIndexer = new RuleIndexer(es.client(), dbTester.getDbClient()); private final DbSession dbSession = dbTester.getSession(); private final UuidFactory uuidFactory = new SequenceUuidFactory(); |