Open pcoello25 opened 8 years ago
Now OrionMongoSinkTest
and OrionSTHSinktest
don't make their tests. Fixing https://github.com/telefonicaid/fiware-cygnus/issues/609 I notice both was calling an obsolete method and I've had to delete it.
I would suggest to start editing the first message for adding all the tests coverage we would like to do.
Adding an initial list of Unit Tests to be implemented (or reimplemented) and a checkbox that can be marked when the test implementation is done:
No milestone, no assignee. This wil be an open issue until all the checkboxes are marked.
Please, follow this format for the tests:
/**
* [OrionMongoBaseSink] -------- Configured 'collection_prefix' cannot be 'system.'.
*/
@Test
public void testConfiguredCollectionPrefixIsNotSystem() {
System.out.println("[OrionMongoBaseSink] -------- Configured 'collection_prefix' cannot be 'system.'");
String collectionPrefix = "system.";
sink.configure(createContext(collectionPrefix));
try {
assertTrue(sink.invalidConfiguration);
System.out.println("[OrionMongoBaseSink] - OK - 'system.' value detected for 'collection_prefix'");
} catch (AssertionError e) {
System.out.println("[OrionMongoBaseSink] - FAIL - 'system.' value not detected for 'collection_prefix'");
throw e;
} // try catch
} // testConfiguredCollectionPrefixIsNotSystem
List of test coverage per component/class:
FUNCTIONAL TESTS
OrionSink:
configure()
.OrionHDFSSink:
configure()
.enable_lowercase=false
(default value), the sink is case sensitive when building the persistence element names.enable_lowercase=true
, the sink do lowercase on the persistence element names./
service-path is notified/defaulted anddata_model=dm-by-entity
, the HDFS path name is<service>/<entityId>_<entityType>/<entityId>_<entityType>.txt
.OrionMySQLSink:
configure()
.enable_lowercase=false
(default value), the sink is case sensitive when building the persistence element names.enable_lowercase=true
, the sink do lowercase on the persistence element names./
service-path is notified/defaulted anddata_model=dm-by-entity
, the MySQL table name is<entityId>_<entityType>
./
service-path is notified/defaulted anddata_model=dm-by-service-path
, the MySQL table name building must throw an exception.OrionCKANSink:
configure()
.enable_lowercase=false
(default value), the sink is case sensitive when building the persistence element names.enable_lowercase=true
, the sink do lowercase on the persistence element names./
service-path is notified/defaulted anddata_model=dm-by-entity
, the CKAN package name is<service>
.OrionKafkaSink:
configure()
.enable_lowercase=false
(default value), the sink is case sensitive when building the persistence element names.enable_lowercase=true
, the sink do lowercase on the persistence element names.data_model=dm-by-service
, the Kafka topic name is<service>
.data_model=dm-by-service-path
, the Kafka topic name is<service>_<service-path>
.data_model=dm-by-entity
, the Kafka topic name is<service>_<service-path>_<entityId>_<entityType>
.data_model=dm-by-attribute
, the Kafka topic name is<service>_<service-path>_<entityId>_<entityType>_<attrName>_<attrType>
.data_model=dm-by-service
, the Kafka topic name is<service>
.data_model=dm-by-service-path
, the Kafka topic name is<service>
.data_model=dm-by-entity
, the Kafka topic name is<service>_<entityId>_<entityType>
.data_model=dm-by-attribute
, the Kafka topic name is<service>_<entityId>_<entityType>_<attrName>_<attrType>
.OrionMongoBaseSink:
configure()
.system.
./
service-path is notified/defaulted anddata_model=dm-by-service-path
, the MongoDB collection name is<prefix>/
./
service-path is notified/defaulted anddata_model=dm-by-entity
, the MongoDB collections name is<prefix>/_<entityId>_<entityType>
./
service-path is notified/defaulted anddata_model=dm-by-attribute
, the MongoDB collections name is<prefix>/_<entityId>_<entityType>_<attrName>_<attrType>
.OrionMongoSink:
configure()
.enable_lowercase=false
(default value), the sink is case sensitive when building the persistence element names.enable_lowercase=true
, the sink do lowercase on the persistence element names./
./
.OrionSTHSink:
configure()
.enable_lowercase=false
(default value), the sink is case sensitive when building the persistence element names.enable_lowercase=true
, the sink do lowercase on the persistence element names./
./
.OrionDynamoDBSink:
configure()
.enable_lowercase=false
(default value), the sink is case sensitive when building the persistence element names.enable_lowercase=true
, the sink do lowercase on the persistence element names.OrionPostgreSQLSink:
configure()
.enable_lowercase=false
(default value), the sink is case sensitive when building the persistence element names.enable_lowercase=true
, the sink do lowercase on the persistence element names.OrionCartoDBSink:
flip_coordinates
cannot be different thantrue
orfalse
.enable_raw
cannot be different thantrue
orfalse
.enable_distance
cannot be different thantrue
orfalse
.data_model
cannot be different thandm-by-service-path
ordm-by-entity
.keys_conf_file
cannot be empty.enable_lowercase=true
always.http
orhttps
schema.data_model=dm-by-service-path
, the CartoDB table name is<servicePath>
.data_model=dm-by-entity
, the CartoDB table name is<servicePath>_<entityId>_<entityType>
.data_model=dm-by-service-path
, the CartoDB table name cannot be created.data_model=dm-by-entity
, the CartoDB table name is<entityId>_<entityType>
.OrionCartoDBSink.CartoDBAggregator:
the_geom
).(
and finishes with)
.(
and finishes with)
.flip_coordinates=true
thenthe_geom
field contains a point with exchanged latitude and longitude.OrionTestSink:
enable_lowercase=false
(default value), the sink is case sensitive when building the persistence element names.enable_lowercase=true
, the sink do lowercase on the persistence element names.KafkaBackend:
OrionRestHandler:
configure()
./
./
.application/json; charset=utf-8
./
.fiware-service
,fiware-servicepath
,fiware-correlator
andtransaction-id
headers.Management Interface:
GET /v1/stats
gets a valid Json response.PUT /v1/stats
sets to 0 the Flume element counters.PUT /admin/log?level=<valid_log_level>
sets the logging level toPUT /admin/log?level=<invalid_log_level>
returns 400 Bad Request.POST /v1/subscriptions?ngsi_version=<ngsi_version>
post a valid subscriptionDELETE /v1/subscriptions?ngsi_version=<ngsi_version>&subscription_id=<subscription_id>
deletes a subscriptionGET /v1/subscriptions?ngsi_version=<ngsi_version>&subscription_id=<subscription_id>
gets a valid Json response.GET /v1/subscriptions?ngsi_version=<ngsi_version>
gets a valid Json response./admin/configuration/agent/path/to/agent.conf
gets a valid Json response/admin/configuration/agent/path/to/agent.conf?param=<param_name>
gets a valid Json response/admin/configuration/agent/path/to/agent.conf?param=<param_name>&value=<param_value>
post succesfully a parameter in the agent/admin/configuration/agent/path/to/agent.conf?param=<param_name>&value=<param_value>
update succesfully a parameter in the agent/admin/configuration/agent/path/to/agent.conf?param=<param_name>
deletes succesfully a parameter in the agentagent_
/admin/configuration/instance/path/to/instance.conf
gets a valid Json response/admin/configuration/instance/path/to/instance.conf?param=<param_name>
gets a valid Json response/admin/configuration/instance/path/to/instance.conf?param=<param_name>&value=<param_value>
post succesfully a parameter in the instance/admin/configuration/instance/path/to/instance.conf?param=<param_name>&value=<param_value>
update succesfully a parameter in the instance/admin/configuration/instance/path/to/instance.conf?param=<param_name>
deletes succesfully a parameter in the instanceCygnusGroupingRule:
/
.CygnusGropuingRules:
NGSIGroupingInterceptor:
configure()
.enable_new_encoding
must betrue
orfalse
.grouping_rules_conf_file
cannot be empty.grouping_rules_conf_file
cannot be null.NGSICharsets:
NON FUNCTIONAL TESTS
HttpBackend:
\n
are correctly processed.Utils:
geo:point
.WGS85
location metadata.geo:point
and there is noWGS84
location metadata.Effort: 7 man day