26379ff34012053741636d68bfccb926f17de2bc
[ric-app/qp-driver.git] / docs / developers-guide.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. SPDX-License-Identifier: CC-BY-4.0
3 .. Copyright (C) 2020 AT&T Intellectual Property
4
5
6 Developers Guide
7 =================
8
9 .. contents::
10    :depth: 3
11    :local:
12
13
14 Version bumping the Xapp
15 ------------------------
16
17 This project follows semver. When changes are made, update the version strings in:
18
19 #. ``container-tag.yaml``
20 #. ``docs/release-notes.rst``
21 #. ``setup.py``
22
23
24 Testing RMR Healthcheck
25 -----------------------
26 The following instructions should deploy the QP Driver container in bare docker, and allow you
27 to test that the RMR healthcheck is working.
28
29 ::
30
31     docker build -t qpd:latest -f  Dockerfile .
32     docker run -d --net=host -e USE_FAKE_SDL=1 qpd:latest
33     docker exec -it CONTAINER_ID /usr/local/bin/rmr_probe -h 127.0.0.1:4562
34
35 Unit Testing
36 ------------
37
38 Running the unit tests requires the python packages ``tox`` and ``pytest``.
39
40 The RMR library is also required during unit tests. If running directly from tox
41 (outside a Docker container), install RMR according to its instructions.
42
43 Upon completion, view the test coverage like this:
44
45 ::
46
47    tox
48    open htmlcov/index.html
49
50 Alternatively, if you cannot install RMR locally, you can run the unit
51 tests in Docker. This is somewhat less nice because you don't get the
52 pretty HTML report on coverage.
53
54 ::
55
56    docker build  --no-cache -f Dockerfile-Unit-Test .