telefonicaid / fiware-cygnus

A connector in charge of persisting context data sources into other third-party databases and storage systems, creating a historical view of the context
https://fiware-cygnus.rtfd.io/
GNU Affero General Public License v3.0
65 stars 105 forks source link

[unit tests] Continuous update #754

Open pcoello25 opened 8 years ago

pcoello25 commented 8 years ago

List of test coverage per component/class:

FUNCTIONAL TESTS

OrionSink:

OrionHDFSSink:

OrionMySQLSink:

OrionCKANSink:

OrionKafkaSink:

OrionMongoBaseSink:

OrionMongoSink:

OrionSTHSink:

OrionDynamoDBSink:

OrionPostgreSQLSink:

OrionCartoDBSink:

OrionCartoDBSink.CartoDBAggregator:

OrionTestSink:

KafkaBackend:

OrionRestHandler:

Management Interface:

CygnusGroupingRule:

CygnusGropuingRules:

NGSIGroupingInterceptor:

NGSICharsets:

NON FUNCTIONAL TESTS

HttpBackend:

Utils:

Effort: 7 man day

pcoello25 commented 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.

frbattid commented 8 years ago

I would suggest to start editing the first message for adding all the tests coverage we would like to do.

frbattid commented 8 years ago

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.

frbattid commented 8 years ago

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