From efa6c47c26ad376c0fcb620accfe6ccd676b1db8 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Wed, 1 Apr 2020 16:11:47 +0200 Subject: [PATCH] Added and fixed rules --- .../validations/validators/TestRules.java | 6 +- .../rules/GeoNetwork/GeoNetwork-OTHER.csv | 3 +- .../rules/GeoNetwork/GeoNetwork-OTHER.json | 2 +- .../rules/GeoNetwork/GeoNetwork-update.csv | 2 + .../rules/GeoNetwork/GeoNetwork-update.json | 2 +- .../rules/ReverseProxy/ReverseProxy-OTHER.csv | 64 ++++++++++++++ .../ReverseProxy/ReverseProxy-OTHER.json | 12 +++ .../SmartExecutor/SmartExecutor-execute.csv | 3 +- .../SmartExecutor-getScheduledExecution.csv | 4 +- .../SmartExecutor-getScheduledExecution.json | 2 +- .../SmartExecutor/SmartExecutor-getState.csv | 83 ++++++++++++++++++- .../SmartExecutor/SmartExecutor-getState.json | 2 +- .../resource-manager-webapp-OTHER.csv | 10 +++ .../resource-manager-webapp-OTHER.json | 12 +++ 14 files changed, 196 insertions(+), 11 deletions(-) create mode 100644 src/test/resources/rules/ReverseProxy/ReverseProxy-OTHER.csv create mode 100644 src/test/resources/rules/ReverseProxy/ReverseProxy-OTHER.json create mode 100644 src/test/resources/rules/resource-manager-webapp/resource-manager-webapp-OTHER.csv create mode 100644 src/test/resources/rules/resource-manager-webapp/resource-manager-webapp-OTHER.json diff --git a/src/test/java/org/gcube/accounting/datamodel/validations/validators/TestRules.java b/src/test/java/org/gcube/accounting/datamodel/validations/validators/TestRules.java index 10ec029..ceffa16 100644 --- a/src/test/java/org/gcube/accounting/datamodel/validations/validators/TestRules.java +++ b/src/test/java/org/gcube/accounting/datamodel/validations/validators/TestRules.java @@ -219,8 +219,8 @@ public class TestRules extends ContextTest { public void testSingleRule() throws Exception { allRules(); File rulesDirectory = getRulesDirectory(); - File rulesDirFile = new File(rulesDirectory, "Catalogue-WS"); - File ruleFile = new File(rulesDirFile, "Catalogue-WS-collection.json"); + File rulesDirFile = new File(rulesDirectory, "GeoNetwork"); + File ruleFile = new File(rulesDirFile, "GeoNetwork-OTHER.json"); testRule(ruleFile); } @@ -228,7 +228,7 @@ public class TestRules extends ContextTest { public void testAllRuleInAdirectory() throws Exception { allRules(); File rulesDirectory = getRulesDirectory(); - File rulesDirFile = new File(rulesDirectory, "gcat"); + File rulesDirFile = new File(rulesDirectory, "SmartExecutor"); FilenameFilter filenameFilter = new FilenameFilter() { @Override diff --git a/src/test/resources/rules/GeoNetwork/GeoNetwork-OTHER.csv b/src/test/resources/rules/GeoNetwork/GeoNetwork-OTHER.csv index 1986478..dbeeb0e 100644 --- a/src/test/resources/rules/GeoNetwork/GeoNetwork-OTHER.csv +++ b/src/test/resources/rules/GeoNetwork/GeoNetwork-OTHER.csv @@ -225,4 +225,5 @@ SDI,GeoNetwork,/srv/fre/admin.ownership.editors SDI,GeoNetwork,/srv/eng/admin.ownership.editors SDI,GeoNetwork,/srv/en/metadata.latest.updated SDI,GeoNetwork,/srv/fre/region.getmap.png -SDI,GeoNetwork,/srv/spa/region.getmap.png \ No newline at end of file +SDI,GeoNetwork,/srv/spa/region.getmap.png +SDI,GeoNetwork,/srv/api/records/48059/editor \ No newline at end of file diff --git a/src/test/resources/rules/GeoNetwork/GeoNetwork-OTHER.json b/src/test/resources/rules/GeoNetwork/GeoNetwork-OTHER.json index 482401b..6af9627 100644 --- a/src/test/resources/rules/GeoNetwork/GeoNetwork-OTHER.json +++ b/src/test/resources/rules/GeoNetwork/GeoNetwork-OTHER.json @@ -2,7 +2,7 @@ "match": { "serviceClassRegex": "(SDI)|(SpatialData)", "serviceNameRegex": "GeoNetwork", - "calledMethodRegex": "^(?!.*(read|create|insert|delete|list|get|show|info|search|update|edit)).*$|^(.*(updated|editors|pwupdate|(systeminfo.*)|forget-password|getmap.png|(GetCapabilities.*)|(\/codelists\/.*)))$" + "calledMethodRegex": "^(?!.*(read|create|insert|delete|list|get|show|info|search|update|edit)).*$|^(.*(updated|editors|pwupdate|(records.*)|(systeminfo.*)|forget-password|getmap.png|(GetCapabilities.*)|(\/codelists\/.*)))$" }, "replace": { "serviceClass": "SDI", diff --git a/src/test/resources/rules/GeoNetwork/GeoNetwork-update.csv b/src/test/resources/rules/GeoNetwork/GeoNetwork-update.csv index dc21f24..900beae 100644 --- a/src/test/resources/rules/GeoNetwork/GeoNetwork-update.csv +++ b/src/test/resources/rules/GeoNetwork/GeoNetwork-update.csv @@ -26,3 +26,5 @@ SDI,GeoNetwork,/srv/en/metadata.edit! SDI,GeoNetwork,/srv/eng/md.edit SDI,GeoNetwork,/srv/eng/md.edit.commit SDI,GeoNetwork,/srv/fre/md.edit +SDI,GeoNetwork,/srv/eng/admin.schematron.update@json +SDI,GeoNetwork,/srv/eng/admin.schematroncriteriagroup.update@json \ No newline at end of file diff --git a/src/test/resources/rules/GeoNetwork/GeoNetwork-update.json b/src/test/resources/rules/GeoNetwork/GeoNetwork-update.json index cfeabc2..370cfd1 100644 --- a/src/test/resources/rules/GeoNetwork/GeoNetwork-update.json +++ b/src/test/resources/rules/GeoNetwork/GeoNetwork-update.json @@ -2,7 +2,7 @@ "match": { "serviceClassRegex": "(SDI)|(SpatialData)", "serviceNameRegex": "GeoNetwork", - "calledMethodRegex": ".*(\\.update($|\\.finish)|\\.edit(!{0,1}|\\.save(only){0,1}|\\.commit)$|\\.infoedit$|\\.pwedit$)" + "calledMethodRegex": ".*(\\.update($|\\.finish|@json)|\\.edit(!{0,1}|\\.save(only){0,1}|\\.commit)$|\\.infoedit$|\\.pwedit$)" }, "replace": { "serviceClass": "SDI", diff --git a/src/test/resources/rules/ReverseProxy/ReverseProxy-OTHER.csv b/src/test/resources/rules/ReverseProxy/ReverseProxy-OTHER.csv new file mode 100644 index 0000000..2dde493 --- /dev/null +++ b/src/test/resources/rules/ReverseProxy/ReverseProxy-OTHER.csv @@ -0,0 +1,64 @@ +Portal,ReverseProxy,/op/ +Portal,ReverseProxy,/op/about.html +Portal,ReverseProxy,/op/command/core/get-all-project-metadata +Portal,ReverseProxy,/op/command/core/get-all-project-tags +Portal,ReverseProxy,/op/command/core/get-importing-configuration +Portal,ReverseProxy,/op/command/core/get-languages +Portal,ReverseProxy,/op/command/core/get-preference +Portal,ReverseProxy,/op/command/core/get-version +Portal,ReverseProxy,/op/command/core/load-language +Portal,ReverseProxy,/op/command/database/saved-connection +Portal,ReverseProxy,/op/extension/database/scripts/index/database-import-form.html +Portal,ReverseProxy,/op/extension/database/styles/bootstrap.css +Portal,ReverseProxy,/op/extension/database/styles/database-import.less +Portal,ReverseProxy,/op/extension/database/styles/jquery.contextMenu.css +Portal,ReverseProxy,/op/extension/database/styles/pure.css +Portal,ReverseProxy,/op/extension/gdata/scripts/index/import-from-gdata-form.html +Portal,ReverseProxy,/op/extension/gdata/styles/importing-controller.less +Portal,ReverseProxy,/op/externals/jquery-ui/css/ui-lightness/jquery-ui-1.10.3.custom.css +Portal,ReverseProxy,/op/externals/jsoneditor/jsoneditor.css +Portal,ReverseProxy,/op/externals/select2/select2.css +Portal,ReverseProxy,/op/externals/tablesorter/theme.blue.css +Portal,ReverseProxy,/op/images/close.png +Portal,ReverseProxy,/op/images/favicon.png +Portal,ReverseProxy,/op/images/large-spinner.gif +Portal,ReverseProxy,/op/images/logo-gem-126.png +Portal,ReverseProxy,/op/images/logo-openrefine-550.png +Portal,ReverseProxy,/op/index-bundle.js +Portal,ReverseProxy,/op/jquery.contextMenu.min.js.map +Portal,ReverseProxy,/op/preferences +Portal,ReverseProxy,/op/preferences-bundle.js +Portal,ReverseProxy,/op/scripts/index/create-project-error-panel.html +Portal,ReverseProxy,/op/scripts/index/create-project-progress-panel.html +Portal,ReverseProxy,/op/scripts/index/create-project-ui-source-selection.html +Portal,ReverseProxy,/op/scripts/index/default-importing-controller/parsing-panel.html +Portal,ReverseProxy,/op/scripts/index/default-importing-sources/import-from-clipboard-form.html +Portal,ReverseProxy,/op/scripts/index/default-importing-sources/import-from-computer-form.html +Portal,ReverseProxy,/op/scripts/index/default-importing-sources/import-from-data-package-form.html +Portal,ReverseProxy,/op/scripts/index/default-importing-sources/import-from-web-form.html +Portal,ReverseProxy,/op/scripts/index/import-project-ui.html +Portal,ReverseProxy,/op/scripts/index/lang-settings-ui.html +Portal,ReverseProxy,/op/scripts/index/open-project-ui.html +Portal,ReverseProxy,/op/scripts/index/parser-interfaces/fixed-width-parser-ui.html +Portal,ReverseProxy,/op/scripts/index/parser-interfaces/line-based-parser-ui.html +Portal,ReverseProxy,/op/scripts/index/parser-interfaces/separator-based-parser-ui.html +Portal,ReverseProxy,/op/scripts/version.js +Portal,ReverseProxy,/op/styles/common.less +Portal,ReverseProxy,/op/styles/index.less +Portal,ReverseProxy,/op/styles/index/create-project-ui.less +Portal,ReverseProxy,/op/styles/index/default-importing-controller.less +Portal,ReverseProxy,/op/styles/index/default-importing-file-selection-panel.less +Portal,ReverseProxy,/op/styles/index/default-importing-parsing-panel.less +Portal,ReverseProxy,/op/styles/index/default-importing-sources.less +Portal,ReverseProxy,/op/styles/index/fixed-width-parser-ui.less +Portal,ReverseProxy,/op/styles/index/import-project-ui.less +Portal,ReverseProxy,/op/styles/index/json-parser-ui.less +Portal,ReverseProxy,/op/styles/index/open-project-ui.less +Portal,ReverseProxy,/op/styles/index/wikitext-parser-ui.less +Portal,ReverseProxy,/op/styles/index/xml-parser-ui.less +Portal,ReverseProxy,/op/styles/jquery-ui-overrides.less +Portal,ReverseProxy,/op/styles/pure.css +Portal,ReverseProxy,/op/styles/util/dialog.less +Portal,ReverseProxy,/op/styles/util/encoding.less +Portal,ReverseProxy,/op/styles/views/data-table-view.less +Portal,ReverseProxy,/op/wirings.js \ No newline at end of file diff --git a/src/test/resources/rules/ReverseProxy/ReverseProxy-OTHER.json b/src/test/resources/rules/ReverseProxy/ReverseProxy-OTHER.json new file mode 100644 index 0000000..27e8aa7 --- /dev/null +++ b/src/test/resources/rules/ReverseProxy/ReverseProxy-OTHER.json @@ -0,0 +1,12 @@ +{ + "match": { + "serviceClassRegex": "Portal", + "serviceNameRegex": "ReverseProxy", + "calledMethodRegex": ".*" + }, + "replace": { + "serviceClass": "Portal", + "serviceName": "ReverseProxy", + "calledMethod": "OTHER" + } +} \ No newline at end of file diff --git a/src/test/resources/rules/SmartExecutor/SmartExecutor-execute.csv b/src/test/resources/rules/SmartExecutor/SmartExecutor-execute.csv index 7c154e6..d8410b5 100644 --- a/src/test/resources/rules/SmartExecutor/SmartExecutor-execute.csv +++ b/src/test/resources/rules/SmartExecutor/SmartExecutor-execute.csv @@ -3,4 +3,5 @@ VREManagement,SmartExecutor,execute VREManagement,SmartExecutor,POST /plugins/accounting-dashboard-harvester-se-plugin/executions/e88025a0-aa16-4925-b805-15c2c802dffa VREManagement,smart-executor,launch VREManagement,smart-executor,execute -VREManagement,smart-executor,POST /plugins/accounting-dashboard-harvester-se-plugin/executions/e88025a0-aa16-4925-b805-15c2c802dffa \ No newline at end of file +VREManagement,smart-executor,POST /plugins/accounting-dashboard-harvester-se-plugin/executions/e88025a0-aa16-4925-b805-15c2c802dffa +VREManagement,SmartExecutor,execute \ No newline at end of file diff --git a/src/test/resources/rules/SmartExecutor/SmartExecutor-getScheduledExecution.csv b/src/test/resources/rules/SmartExecutor/SmartExecutor-getScheduledExecution.csv index 81237a9..077cda5 100644 --- a/src/test/resources/rules/SmartExecutor/SmartExecutor-getScheduledExecution.csv +++ b/src/test/resources/rules/SmartExecutor/SmartExecutor-getScheduledExecution.csv @@ -3,4 +3,6 @@ VREManagement,SmartExecutor,GET /plugins/accounting-dashboard-harvester-se-plugi VREManagement,SmartExecutor,GET /plugins/accounting-dashboard-harvester-se-plugin/executions/ VREManagement,smart-executor,getScheduledExecution VREManagement,smart-executor,GET /plugins/accounting-dashboard-harvester-se-plugin/executions -VREManagement,smart-executor,GET /plugins/accounting-dashboard-harvester-se-plugin/executions/ \ No newline at end of file +VREManagement,smart-executor,GET /plugins/accounting-dashboard-harvester-se-plugin/executions/ +VREManagement,SmartExecutor,/rest/plugins/HelloWorld +VREManagement,SmartExecutor,/plugins/HelloWorld \ No newline at end of file diff --git a/src/test/resources/rules/SmartExecutor/SmartExecutor-getScheduledExecution.json b/src/test/resources/rules/SmartExecutor/SmartExecutor-getScheduledExecution.json index 751d4f9..8748379 100644 --- a/src/test/resources/rules/SmartExecutor/SmartExecutor-getScheduledExecution.json +++ b/src/test/resources/rules/SmartExecutor/SmartExecutor-getScheduledExecution.json @@ -2,7 +2,7 @@ "match": { "serviceClassRegex": "VREManagement", "serviceNameRegex": "(SmartExecutor)|(smart-executor)", - "calledMethodRegex": ".*((getScheduledExecution.*)|(GET .*executions(\/){0,1}$))" + "calledMethodRegex": ".*((getScheduledExecution.*)|(GET .*executions(\/){0,1}$))|((GET ){0,1}(\/){0,1}(rest\/){0,1}plugins\/[a-zA-Z]{1,})" }, "replace": { "serviceClass": "VREManagement", diff --git a/src/test/resources/rules/SmartExecutor/SmartExecutor-getState.csv b/src/test/resources/rules/SmartExecutor/SmartExecutor-getState.csv index ec9d4e5..07c5d64 100644 --- a/src/test/resources/rules/SmartExecutor/SmartExecutor-getState.csv +++ b/src/test/resources/rules/SmartExecutor/SmartExecutor-getState.csv @@ -2,4 +2,85 @@ VREManagement,SmartExecutor,getStateEvolution VREManagement,SmartExecutor,getState VREManagement,SmartExecutor,GET /plugins/accounting-dashboard-harvester-se-plugin/executions/e88025a0-aa16-4925-b805-15c2c802dffa VREManagement,smart-executor,getStateEvolution -VREManagement,smart-executor,GET /plugins/accounting-dashboard-harvester-se-plugin/executions/e88025a0-aa16-4925-b805-15c2c802dffa \ No newline at end of file +VREManagement,smart-executor,GET /plugins/accounting-dashboard-harvester-se-plugin/executions/e88025a0-aa16-4925-b805-15c2c802dffa +VREManagement,SmartExecutor,/plugins/HelloWorld/577013f6-2d07-4071-af7b-c3c6a064fbda-98187548 +VREManagement,SmartExecutor,/plugins/HelloWorld/57ed4d61-a3b3-4e89-8bb2-3f83014a0ffc +VREManagement,SmartExecutor,/plugins/HelloWorld/735dc808-b68f-4ce2-ac08-9397c290ee43 +VREManagement,SmartExecutor,/plugins/HelloWorld/ff00a3eb-eeb7-4685-92af-222ef7ce3b8f +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/04c322d0-e228-4334-bdc6-206079b0ea96 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/077b79a5-29a5-4953-9777-e8f14d40a2da +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/07896f09-a905-4027-a820-88a1e3ea4a97 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/07906e16-4c52-469c-8987-730f7c2b508c +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/12ef9c1b-8cf3-4cc3-8b53-4df092424c95 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/13f66c80-d682-4b7b-b440-9d2b084e2698 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/160544f0-418a-4a9a-8711-7bf6138d129f +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/1b0270e1-ce6c-4e7b-a11c-fdfc8f7c0f2a +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/1ce4aba0-920e-490a-8f31-8e5daac75b6c +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/22a6dff0-3e38-42bd-ac7e-84fb4f1a0d78 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/235847e8-8602-407c-8314-162b51fe4797 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/24c109c9-9b18-43e6-b926-a6355225a873 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/2671c927-9afe-4bb9-b6ab-a8ea96700a95 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/2fbb7a7e-f0db-4b90-865f-b671a2a29add +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/311f7957-fa6d-47ab-a8a3-9de7954be54f +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/315beb8c-ea08-48d0-ae01-942f332389b6 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/39f9bfc2-22c3-427c-88a4-d5229650d952 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/3a2bb81b-cbc2-40e3-920a-457a44a014fb +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/41eb1ff0-05e6-4ecd-b659-859f64694a3d +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/461617c9-e23a-4d99-a9f8-ec0ab36a4ff7 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/47deab81-210f-4ac9-86b9-3a5a73aceca5 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/48c63404-7b15-4c02-950d-30d8ef19e493 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/4c4d9658-3f66-45e4-9af5-2adb8799eb27 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/4e1b4005-e7d6-4ae7-bbd4-7e1141e316f6 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/50ea20f9-2549-49b2-a8c2-1e4fca358956 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/55d55cb5-5e5d-4a26-8a39-9ee963bbea6c +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/5641750b-69b1-41a7-bc38-1484e1bd8852 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/565088dd-bbc1-4c68-9479-738f035dbe97 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/5807a3be-f9fd-4b3b-9f50-9d3512efc01a +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/5ba65764-2bf4-4c76-a518-9f7f01c500d9 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/60af44ba-0038-4301-b336-a043a21669b3 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/62ba43fa-314c-41aa-9d9a-04803bef8cf0 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/632cf58f-ac2e-46f7-a127-f5aa2ff90500 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/698f6f04-1b67-4487-8f6c-bd0df82e8ea3 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/6f89260d-98a5-46c2-88ff-451ee819e280 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/71346039-365f-4a19-ba3d-7d9d092f9b3e +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/7645d070-58d0-4371-b009-01f864df4587 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/7df373f3-4355-4fe7-bc5b-a09fa6a4fa9f +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/7f49cc58-6af1-477c-bd0b-469b97c7a14c +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/82bdd0fd-9dd1-4ac0-9a6d-35a6a265ce24 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/86c48433-41a7-4c49-8713-745de5b1a0f7 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/9102be2a-9cf5-4ba5-9810-6bae90868c16 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/978cd9c6-7546-4d07-910c-76b50b0e1106 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/99e6f407-43c1-4b3d-bebe-54a98b390c90 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/9a3d6a1b-93c6-4cd8-85c4-06550585dad3 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/9c136db3-9dbd-4cec-8c7f-110a1c3ea02b +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/9f072ff0-e094-49bd-9c0c-3df571349195 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/a51c7796-cb5e-4f81-b59d-e2591a69978a +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/a5bed4a9-5380-49b1-9786-5f028929f937 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/a5de710d-3ad3-4048-a75e-353fb8ada0a5 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/b0743694-65d4-4e07-b5c7-ef06696e2ce9 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/b8df0c86-94d2-4d60-9510-b3b197605aff +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/ba035f70-d8ad-4f7c-9abd-93b7103c889d +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/bf8f4122-db8c-4b21-a9dc-30d2378766a1 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/ce30ac42-1894-486d-890f-cfd16e913ce1 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/d3045f8b-7644-403a-a370-113fee4b775c +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/d4417cab-22ae-4188-8313-57ef80a98c26 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/d967cbdc-f12a-4217-88d8-2efc6d39ce89 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/d9cb233d-fcfc-4f46-9e66-d75390e36c9a +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/d9f51733-20d6-4fe2-97e2-f3dd23a4f1c9 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/e08a91be-b515-4cfc-9973-02c73d017449 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/e168ab5e-32be-4f88-b058-5c8bc31a2531 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/e197a454-eda4-4e27-943f-603f5fe0bb9b +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/e2b4939a-d056-4499-989a-975bf5ec8d01 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/e44802de-fbfb-4d4f-a661-1e227fce24d2 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/e9ae3010-fc9f-4bb1-93f2-9a7cc453bb95 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/e9fcb909-7d30-4f61-846e-633e496614a1 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/ec442572-b13c-4aab-bee6-4ac04bb61eea +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/ed8f6826-7f9a-431b-ab55-81874c726079 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/eebdd771-9deb-47ee-8c57-268eb7c5436e +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/f11cbc7c-5165-4aa8-b178-a3fbd82b9908 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/f4376433-20c5-40b1-a90c-ed184a2500e4 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/f583583e-f419-4886-850c-d534a4255559 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/fb32a573-5928-40b7-a986-3289ff25ec46 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/ffa2009b-c21d-4e9d-8fcd-54390480efa2 +VREManagement,SmartExecutor,/rest/plugins/HelloWorld/ffb3efcc-baa9-43a0-b8fd-cc2e65aa3e9e +VREManagement,SmartExecutor,getState \ No newline at end of file diff --git a/src/test/resources/rules/SmartExecutor/SmartExecutor-getState.json b/src/test/resources/rules/SmartExecutor/SmartExecutor-getState.json index 18839bd..e9a9218 100644 --- a/src/test/resources/rules/SmartExecutor/SmartExecutor-getState.json +++ b/src/test/resources/rules/SmartExecutor/SmartExecutor-getState.json @@ -2,7 +2,7 @@ "match": { "serviceClassRegex": "VREManagement", "serviceNameRegex": "(SmartExecutor)|(smart-executor)", - "calledMethodRegex": ".*((getStateEvolution)|(getState)|(GET .*executions\/.{1,})).*" + "calledMethodRegex": ".*((getStateEvolution)|(getState)|(GET .*executions\/.{1,})).*|((GET ){0,1}(\/){0,1}(rest\/){0,1}plugins\/[a-zA-Z]{1,}\/.*)" }, "replace": { "serviceClass": "VREManagement", diff --git a/src/test/resources/rules/resource-manager-webapp/resource-manager-webapp-OTHER.csv b/src/test/resources/rules/resource-manager-webapp/resource-manager-webapp-OTHER.csv new file mode 100644 index 0000000..2bc7312 --- /dev/null +++ b/src/test/resources/rules/resource-manager-webapp/resource-manager-webapp-OTHER.csv @@ -0,0 +1,10 @@ +ResourceManagement,resource-manager-webapp,/context +ResourceManagement,resource-manager-webapp,/context/5f86dc81-2f59-486b-8aa9-3ab5486313c4 +ResourceManagement,resource-manager-webapp,/context/delete +ResourceManagement,resource-manager-webapp,/gxrest +ResourceManagement,resource-manager-webapp,/gxrest/ +ResourceManagement,resource-manager-webapp,/gxrest/5f86dc81-2f59-486b-8aa9-3ab5486313c4 +ResourceManagement,resource-manager-webapp,/gxrest/5f86dc81-2f59-486b-8aa9-3ab5486313c4/ +ResourceManagement,resource-manager-webapp,/gxrest5f86dc81-2f59-486b-8aa9-3ab5486313c4 +ResourceManagement,resource-manager-webapp,/null/gxrest +ResourceManagement,resource-manager-webapp,/null/gxrest/5f86dc81-2f59-486b-8aa9-3ab5486313c4 \ No newline at end of file diff --git a/src/test/resources/rules/resource-manager-webapp/resource-manager-webapp-OTHER.json b/src/test/resources/rules/resource-manager-webapp/resource-manager-webapp-OTHER.json new file mode 100644 index 0000000..96b1801 --- /dev/null +++ b/src/test/resources/rules/resource-manager-webapp/resource-manager-webapp-OTHER.json @@ -0,0 +1,12 @@ +{ + "match": { + "serviceClassRegex": "ResourceManagement", + "serviceNameRegex": "resource-manager-webapp", + "calledMethodRegex": ".*" + }, + "replace": { + "serviceClass": "ResourceManagement", + "serviceName": "resource-manager-webapp", + "calledMethod": "OTHER" + } +} \ No newline at end of file