diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2018-09-04 16:08:00 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2018-09-24 20:20:57 +0200 |
commit | 6b71b52fde2bc496ee84c87b79a4a186e8f78774 (patch) | |
tree | acf0d9e4c0cd93d08e57e95c483f01c90d3e0164 /server/sonar-server-common/src/test | |
parent | e5f73ecf404ab7342a772fd5630835c7893e0c84 (diff) | |
download | sonarqube-6b71b52fde2bc496ee84c87b79a4a186e8f78774.tar.gz sonarqube-6b71b52fde2bc496ee84c87b79a4a186e8f78774.zip |
SONAR-11212 Distinguish predefined and ad hoc external rules
Diffstat (limited to 'server/sonar-server-common/src/test')
6 files changed, 21 insertions, 5 deletions
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/rule/ExternalRuleCreatorTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/rule/ExternalRuleCreatorTest.java index 32b9d329e79..59d4d28fcfe 100644 --- a/server/sonar-server-common/src/test/java/org/sonar/server/rule/ExternalRuleCreatorTest.java +++ b/server/sonar-server-common/src/test/java/org/sonar/server/rule/ExternalRuleCreatorTest.java @@ -54,6 +54,7 @@ public class ExternalRuleCreatorTest { assertThat(rule1).isNotNull(); assertThat(rule1.isExternal()).isTrue(); + assertThat(rule1.isAdHoc()).isTrue(); assertThat(rule1.getId()).isGreaterThan(0); assertThat(rule1.getKey()).isEqualTo(ruleKey); assertThat(rule1.getPluginKey()).isEqualTo("eslint"); diff --git a/server/sonar-server-common/src/test/resources/org/sonar/server/issue/index/IssueIteratorFactoryTest/extract_directory_path.xml b/server/sonar-server-common/src/test/resources/org/sonar/server/issue/index/IssueIteratorFactoryTest/extract_directory_path.xml index 5af7683e247..d257bf0cd05 100644 --- a/server/sonar-server-common/src/test/resources/org/sonar/server/issue/index/IssueIteratorFactoryTest/extract_directory_path.xml +++ b/server/sonar-server-common/src/test/resources/org/sonar/server/issue/index/IssueIteratorFactoryTest/extract_directory_path.xml @@ -5,7 +5,10 @@ plugin_rule_key="AvoidCycles" plugin_config_key="[null]" plugin_name="squid" - scope="MAIN"/> + scope="MAIN" + is_external="[false]" + is_ad_hoc="[false]" + /> <projects organization_uuid="org1" uuid="PROJECT" diff --git a/server/sonar-server-common/src/test/resources/org/sonar/server/issue/index/IssueIteratorFactoryTest/extract_file_path.xml b/server/sonar-server-common/src/test/resources/org/sonar/server/issue/index/IssueIteratorFactoryTest/extract_file_path.xml index bd3b3d209ad..eb58f9b90ce 100644 --- a/server/sonar-server-common/src/test/resources/org/sonar/server/issue/index/IssueIteratorFactoryTest/extract_file_path.xml +++ b/server/sonar-server-common/src/test/resources/org/sonar/server/issue/index/IssueIteratorFactoryTest/extract_file_path.xml @@ -5,7 +5,10 @@ plugin_rule_key="AvoidCycles" plugin_config_key="[null]" plugin_name="squid" - scope="MAIN"/> + scope="MAIN" + is_external="[false]" + is_ad_hoc="[false]" + /> <projects organization_uuid="org1" uuid="PROJECT" diff --git a/server/sonar-server-common/src/test/resources/org/sonar/server/issue/index/IssueIteratorFactoryTest/many_projects.xml b/server/sonar-server-common/src/test/resources/org/sonar/server/issue/index/IssueIteratorFactoryTest/many_projects.xml index d7ab806a620..928529f177e 100644 --- a/server/sonar-server-common/src/test/resources/org/sonar/server/issue/index/IssueIteratorFactoryTest/many_projects.xml +++ b/server/sonar-server-common/src/test/resources/org/sonar/server/issue/index/IssueIteratorFactoryTest/many_projects.xml @@ -5,7 +5,10 @@ plugin_rule_key="AvoidCycles" plugin_config_key="[null]" plugin_name="squid" - scope="MAIN"/> + scope="MAIN" + is_external="[false]" + is_ad_hoc="[false]" + /> <!-- Project 1 --> <projects organization_uuid="org1" diff --git a/server/sonar-server-common/src/test/resources/org/sonar/server/issue/index/IssueIteratorFactoryTest/one_issue.xml b/server/sonar-server-common/src/test/resources/org/sonar/server/issue/index/IssueIteratorFactoryTest/one_issue.xml index 01ce4b7f5a3..8508e2eee2e 100644 --- a/server/sonar-server-common/src/test/resources/org/sonar/server/issue/index/IssueIteratorFactoryTest/one_issue.xml +++ b/server/sonar-server-common/src/test/resources/org/sonar/server/issue/index/IssueIteratorFactoryTest/one_issue.xml @@ -5,7 +5,10 @@ plugin_rule_key="AvoidCycles" plugin_config_key="[null]" plugin_name="squid" - scope="MAIN"/> + scope="MAIN" + is_external="[false]" + is_ad_hoc="[false]" + /> <projects organization_uuid="org1" uuid="PROJECT1" diff --git a/server/sonar-server-common/src/test/resources/org/sonar/server/issue/index/IssueIteratorFactoryTest/shared.xml b/server/sonar-server-common/src/test/resources/org/sonar/server/issue/index/IssueIteratorFactoryTest/shared.xml index f1f43e28ddf..36631ed9430 100644 --- a/server/sonar-server-common/src/test/resources/org/sonar/server/issue/index/IssueIteratorFactoryTest/shared.xml +++ b/server/sonar-server-common/src/test/resources/org/sonar/server/issue/index/IssueIteratorFactoryTest/shared.xml @@ -5,7 +5,10 @@ plugin_rule_key="AvoidCycles" plugin_config_key="[null]" plugin_name="squid" - scope="MAIN"/> + scope="MAIN" + is_external="[false]" + is_ad_hoc="[false]" + /> <projects organization_uuid="org1" uuid="PROJECT1" |