Commit cbe9f17f authored by Kirill Smelkov's avatar Kirill Smelkov

software/ors-amarisoft: Fix json-schemas complain about spaces in software.cfg.json

Previously json-schemas tests were passing on software/ors-amarisoft but the
status was misleading: since json-schemas check only software.cfg.json, and
until recently - before the patch to switch RU type to be a runtime parameter,
there was _no_ such file in here, nothing about software-*.cfg.json was checked at all.

But after the switch we started to have software.cfg and software.cfg.json
files which json schemas checks and errors start to appear.

Here we fix the following error popping up due to extra blank lines around "ue" entry in software.cfg.json:

    FAIL: test_ors-amarisoft_software_cfg_json_format (slapos.test.test_json_schema.TestJSONSchemaValidation)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/srv/slapgrid/slappart91/srv/project/slapos/slapos/test/test_json_schema.py", line 85, in run
        self.assertEqual(
    AssertionError: Lists differ: ['{',[145 chars]{', '    "ue": {', '      "title": "UE",', '  [1344 chars] '}'] != ['{',[145 chars]{', '', '    "ue": {', '      "title": "UE",',[1352 chars] '}']

    First differing element 5:
    '    "ue": {'
    ''

    Second list contains 2 additional elements.
    First extra element 48:
    '  }'

    Diff is 1703 characters long. Set self.maxDiff to None to see it.
parent 4b1cb8fd
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
"description": "4G and 5G amarisoft stack for ORS", "description": "4G and 5G amarisoft stack for ORS",
"serialisation": "json-in-xml", "serialisation": "json-in-xml",
"software-type": { "software-type": {
"enb": { "enb": {
"title": "eNB", "title": "eNB",
"software-type": "enb", "software-type": "enb",
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
"description": "4G and 5G amarisoft stack for ORS", "description": "4G and 5G amarisoft stack for ORS",
"serialisation": "json-in-xml", "serialisation": "json-in-xml",
"software-type": { "software-type": {
"ue": { "ue": {
"title": "UE", "title": "UE",
"description": "UE Configuration", "description": "UE Configuration",
...@@ -12,7 +11,6 @@ ...@@ -12,7 +11,6 @@
"response": "instance-ue-schema.json", "response": "instance-ue-schema.json",
"index": 4 "index": 4
}, },
"enb": { "enb": {
"title": "eNB", "title": "eNB",
"software-type": "enb", "software-type": "enb",
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"description": "4G and 5G amarisoft stack for ORS", "description": "4G and 5G amarisoft stack for ORS",
"serialisation": "json-in-xml", "serialisation": "json-in-xml",
"software-type": { "software-type": {
{% if bbu != 'ors' %} {%- if bbu != 'ors' %}
"ue": { "ue": {
"title": "UE", "title": "UE",
"description": "UE Configuration", "description": "UE Configuration",
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
"response": "instance{{ v }}-ue-schema.json", "response": "instance{{ v }}-ue-schema.json",
"index": 4 "index": 4
}, },
{% endif %} {%- endif %}
"enb": { "enb": {
"title": "eNB", "title": "eNB",
"software-type": "enb", "software-type": "enb",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment