• Kirill Smelkov's avatar
    software/ors-amarisoft: Fix json-schemas complain about spaces in software.cfg.json · 96c4bcf4
    Kirill Smelkov authored
    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.
    96c4bcf4
software.cfg.json.jinja2 1.52 KB