You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

CPS-595 - Getting issue details... STATUS


Integration Test: 

Integration tests are used to check how each service works with other services and with external components. They are not concerned with the behavior of each service internally, but focus instead on the communication between services. They can also be used to test external components like databases.

Implementation in CPS :

At present CPS has 4 different components namely, cps-core, cps-temporal, cps-ncmp and cps-tbdmt. Integration test of a component hence would be dependent on another component. This proposal page is to discuss on all the available options and their pros and cons. 

Three different implementation proposals as below:

1. Each component contains its own docker-compose file listing all the services required for the integration test. Eg : cps-temporal docker-compose would have services  cps-temporal, timescaledb, zookeeper, cps-and-ncmp and kafka.

Pros:

  • Faster implementation

Cons:

  • Every change made in a single service would have to be duplicated in all the other files where the same service is used like addition of new environment variables.
  • Harder to maintain

2. Each component contains its own docker-compose file with the services required for stand alone testing. Eg: cps-temporal docker-compose only containing services cps-temporal, timescaledb, zoopkeeper and kafka. 

Include steps to fetch the docker-compose of cps-core in the setup.sh file in CSIT as shown below:

      git clone https://github.com/onap/cps.git

Combine the docker-compose of cps-temporal and cps while executing docker-compose up 

     docker-compose -f docker-compose.yml -f ../cps/docker-compose/docker-compose.yml up

Pros: 

  • No need for code replication.
  • docker-compose files specific to each component

Cons:

  • Cloning the dependent repo

3. Create a repo for all the common artifacts like the CSIT, documents. Sub modules could be created for different components inside CSIT to include both the docker-compose and test plan.

Eg: cps-temporal CSIT would combine the docker-compose of cps-temporal and cps while executing docker-compose up as below :

     docker-compose -f docker-compose.yml -f ../cps/docker-compose.yml up

Pros:

  • No need to replicate the docker-compose
  • docker-compose files specific to each component maintained in different sub modules
  • No cloning required for the dependent repo to run CSIT

Cons:

  • CI-management jobs will have to be created, hence time consuming for now
  • Manageability of an additional repo .

Test Plan:

S NoScenarioSteps 
CPS

1.1
CPS Admin Details Insert
  1. Create Dataspace 
  2. Create Schema set with Zip file
  3. Get schema set 
  4. Create anchor for the created schema-set and dataspace
  5. Get Anchor
1.2CPS Data Node Insert, Update and Delete
1. Create Data Node
2. Get Data Node
2. Update Data Node
3. Delete Data Node
4. Get Data Node
CPS Temporal
2.1Create an anchor history
  1. Create Data Node using cps api 
  2. Update the Data Node using cps api
  3. Get the history of the anchor using cps-temporal api 
    /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/history
2.2Delete the data node to add it to history
  1. Create Data Node using cps api 
  2. Update the Data Node using cps api
  3. Delete the data node using cps-api
  4. Get the history of the anchor using cps-temporal api 
    /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/history
CPS-NCMP-DMI_PLUGIN
3.1

Model-Sync, Write & read data using datastore PassTrough







  • No labels