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