From 2e66d3f7c16afd61a02ff56214dfc51ba5033741 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Thu, 21 Nov 2019 18:23:41 +0100 Subject: [PATCH] Added rules for geoanalytics-main-service refs #18081 --- .../datamodel/validations/validators/TestRules.java | 3 ++- .../geoanalytics-main-service-UNKNOWN-rule.json | 12 ++++++++++++ .../geoanalytics-main-service-UNKNOWN-values.csv | 3 +++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 src/test/resources/rules/geoanalytics-main-service-UNKNOWN-rule.json create mode 100644 src/test/resources/rules/geoanalytics-main-service-UNKNOWN-values.csv 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 31ff96a..e2e77ea 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 @@ -33,6 +33,7 @@ public class TestRules { "FullTextIndexNode-insert", "FullTextIndexNode-listCollections", "FullTextIndexNode-search", + "geoanalytics-main-service-UNKNOWN", "GeoNetwork-login", "RConnector-connect", "RConnector-UNKNOWN", @@ -82,7 +83,7 @@ public class TestRules { @Test public void testSingleRule() throws Exception { - testRule("ShareLatex-disconnect"); + testRule("geoanalytics-main-service-UNKNOWN"); } } diff --git a/src/test/resources/rules/geoanalytics-main-service-UNKNOWN-rule.json b/src/test/resources/rules/geoanalytics-main-service-UNKNOWN-rule.json new file mode 100644 index 0000000..9dfa650 --- /dev/null +++ b/src/test/resources/rules/geoanalytics-main-service-UNKNOWN-rule.json @@ -0,0 +1,12 @@ +{ + "match": { + "serviceClassRegex": "geoanalytics", + "serviceNameRegex": "geoanalytics-main-service", + "calledMethodRegex": ".*" + }, + "replace": { + "serviceClass": "geoanalytics", + "serviceName": "geoanalytics-main-service", + "calledMethod": "UNKNOWN" + } +} \ No newline at end of file diff --git a/src/test/resources/rules/geoanalytics-main-service-UNKNOWN-values.csv b/src/test/resources/rules/geoanalytics-main-service-UNKNOWN-values.csv new file mode 100644 index 0000000..8ae396a --- /dev/null +++ b/src/test/resources/rules/geoanalytics-main-service-UNKNOWN-values.csv @@ -0,0 +1,3 @@ +geoanalytics,geoanalytics-main-service,/ +geoanalytics,geoanalytics-main-service,/index.html +geoanalytics,geoanalytics-main-service,index.html \ No newline at end of file