Test the ansible validations

Bug #1594785 reported by Tomas Sedovic on 2016-06-21
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Medium
Gael Chamoulaud

Bug Description

While a full validation testing would require a complete running deployment, we ought to at least unit test the custom Python modules we're using:

http://www.relaxdiego.com/2016/06/writing-ansible-modules-with-tests.html

https://pypi.python.org/pypi/pytest-ansible/

Martin André (mandre) on 2016-07-27
affects: tripleo-validations → tripleo
tags: added: validations
Tomas Sedovic (tsedovic) on 2016-08-15
Changed in tripleo:
status: New → Triaged
importance: Undecided → Medium
Tomas Sedovic (tsedovic) wrote :

Since the validations we're imorting have all been manually tested and the important work is usually outside of the main function, we could just do simple unit tests before doing the heavier checking described in the articles above.

We should write code that provides the necessary machinery (install ansible in the test virtual environment, etc.) and then base all the unit test patches on top of that to avoid merge conflicts.

Here's a patch that adds a unit test and so we could just split that part off:

https://review.openstack.org/#/c/341586/

Fix proposed to branch: master
Review: https://review.openstack.org/456557

Changed in tripleo:
assignee: nobody → Katerina Pilatova (kpilatov)
status: Triaged → In Progress
Changed in tripleo:
assignee: Katerina Pilatova (kpilatov) → Martin André (mandre)

Reviewed: https://review.openstack.org/456557
Committed: https://git.openstack.org/cgit/openstack/tripleo-validations/commit/?id=c55fb2481343b2aa821148f6135ec05154b0e154
Submitter: Jenkins
Branch: master

commit c55fb2481343b2aa821148f6135ec05154b0e154
Author: Katerina Pilatova <email address hidden>
Date: Thu Apr 13 12:49:26 2017 +0200

    Unit testing for ip_range

    - modifies custom module ip_range.py in such a way that its individual
      stages can be easily tested
    - tests for this module (test_ip_range.py) are created

    Change-Id: Id1ee5db19c673da318ec21d98bdd02c766a219f5
    Partial-Bug: #1594785

Fix proposed to branch: master
Review: https://review.openstack.org/457628

Changed in tripleo:
assignee: Martin André (mandre) → Katerina Pilatova (kpilatov)

Fix proposed to branch: master
Review: https://review.openstack.org/473522

Reviewed: https://review.openstack.org/457628
Committed: https://git.openstack.org/cgit/openstack/tripleo-validations/commit/?id=a85fdc643ba144d4a5f2031dfb40c0b6456507ec
Submitter: Jenkins
Branch: master

commit a85fdc643ba144d4a5f2031dfb40c0b6456507ec
Author: Katerina Pilatova <email address hidden>
Date: Tue Apr 18 15:08:24 2017 +0200

    Unit testing for undercloud_conf

    - modifies custom module undercloud_conf.py in such a way that its individual
      stages can be easily tested
    - tests for this module (test_undercloud_conf.py) are created

    Change-Id: I65951cd9bc864a731d485a94bf468eab46e7e2a0
    Partial-Bug: #1594785

Changed in tripleo:
assignee: Katerina Pilatova (kpilatov) → Gael Chamoulaud (gael-chamoulaud)

Reviewed: https://review.openstack.org/473522
Committed: https://git.openstack.org/cgit/openstack/tripleo-validations/commit/?id=dcb49e2ee0d7f7628ffa03720e7f22f38c08f94a
Submitter: Zuul
Branch: master

commit dcb49e2ee0d7f7628ffa03720e7f22f38c08f94a
Author: Katerina Pilatova <email address hidden>
Date: Mon Jun 12 18:26:43 2017 +0200

    Unit testing for ini

    - modifies custom module ini.py in such a way that its individual
      stages can be easily tested
    - tests for this module (test_ini.py) are created

    Change-Id: I0250837cc97705a7eb9eb81395aaeba86292bc89
    Partial-Bug: #1594785

Reviewed: https://review.openstack.org/527020
Committed: https://git.openstack.org/cgit/openstack/tripleo-validations/commit/?id=4c7e5b1bc0f18b07e74333d717955d9825dc0ab9
Submitter: Zuul
Branch: stable/pike

commit 4c7e5b1bc0f18b07e74333d717955d9825dc0ab9
Author: Katerina Pilatova <email address hidden>
Date: Mon Jun 12 18:26:43 2017 +0200

    Unit testing for ini

    - modifies custom module ini.py in such a way that its individual
      stages can be easily tested
    - tests for this module (test_ini.py) are created

    Change-Id: I0250837cc97705a7eb9eb81395aaeba86292bc89
    Partial-Bug: #1594785
    (cherry picked from commit dcb49e2ee0d7f7628ffa03720e7f22f38c08f94a)

tags: added: in-stable-pike
Changed in tripleo:
milestone: none → stein-3
Changed in tripleo:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers