Create system tests for collect anonymous usage statistics feature

Registered by Artem Panchenko

In the next release we have new feature “Sending usage statistics” in Fuel: https://blueprints.launchpad.net/openstack/?searchtext=send-anon-usage

We should create automatic system tests for that feature which can be executed on CI in daily basis.

Test integration plan:

 - we should add additional environment variables in tests settings which will be used for enabling of stats collecting/sending and defining collector IP address;
 - add methods which enable/disable collecting of statistics in tests and can force sending of data to collector;
 - add separate test (or maybe decorator) which can use environment snapshots created by other tests (or last created environment), checks that appropriate common logs (cluster creation/configuring, roles definition, deployment result) were added to Nailgun’s database (action_logs), sent to the collector (parse stats sender logs) and correctly saved there (ssh to test VM with collector and check DB). For separate test we can use predefined test scenario of environment snapshots which is reverted or parse scenario from doc string in case of decorator.
- check stat sending with enabled/disabled setting
- check saved content in the Nailgun DB action_logs. saved content should not contain any passwords, ips, netmasks, emails, tenants, session ids
- check sending statistics into collector:
    - send action logs of all types
    - check only not sent before action logs are sent
    - send installation structure in ha and multinode modes
- check data in the collector DB:
    - check no passwords, ips, netmasks, emails, tenants, session ids in action_logs, installation_structures tables
- check migration from collector DB into Elasticsearch
    - check modified installation structs migration
    - check only new action_logs migration

Blueprint information

Status:
Complete
Approver:
Nastya Urlapova
Priority:
Undefined
Drafter:
Alexander Kislitsky
Direction:
Needs approval
Assignee:
Artem Panchenko
Definition:
Approved
Series goal:
Accepted for 6.0.x
Implementation:
Implemented
Milestone target:
None
Started by
Nastya Urlapova
Completed by
Artem Panchenko

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/fuel-stats-test,n,z

Addressed by: https://review.openstack.org/131612
    Enable Fuel stats sending to test collector

Addressed by: https://review.openstack.org/131895
    Add decorator to check Fuel statistics sending

Addressed by: https://review.openstack.org/141763
    WIP Check stats collecting after tests

Addressed by: https://review.openstack.org/142576
    Add var to tests which enables stats checking

Addressed by: https://review.openstack.org/142827
    Fix regex for checking private data in statistics

Addressed by: https://review.openstack.org/143890
    Enable Fuel stats sending to test collector

Addressed by: https://review.openstack.org/143892
    Add decorator to check Fuel statistics sending

Addressed by: https://review.openstack.org/143895
    Check stats collecting after tests

Addressed by: https://review.openstack.org/143896
    Add var to tests which enables stats checking

Addressed by: https://review.openstack.org/143897
    Fix regex for checking private data in statistics

Addressed by: https://review.openstack.org/150584
    Send usage statistics to test Collector (default)

Addressed by: https://review.openstack.org/150589
    Send usage statistics to test Collector (default)

Addressed by: https://review.openstack.org/151568
    Restart 'statsenderd' after changing Collector IP

Addressed by: https://review.openstack.org/151572
    Restart 'statsenderd' after changing Collector IP

Addressed by: https://review.openstack.org/153947
    Restart 'statsenderd' after changing Collector IP

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.