frostyx / copr / copr

Forked from copr/copr 7 years ago
Clone

1786056 [beaker-tests-sanity] count packages more reliably

1 file Authored by frostyx 5 years ago, Committed by msuchy 5 years ago,
    [beaker-tests-sanity] count packages more reliably
    
    The previous version relied on the fact, that there is only one "name"
    field per package json. That sounds reasonable at first, because how
    can there be more names? Well, in inner dicts it can.
    
    {
      "id": 318166,
      "name": "ed",
      ...
      "builds": [
        {
          "id": 836680,
          "source_package": {
            "name": "ed",
    	...
          }
        }
      ]
    }
    
    We needed to use a tool that understands the json format (jq) and
    parse just the package names from it. And then compare them and
    count them.