~adam-collard/click-reviewers-tools/store-requests-category

Viewing all changes in revision 1209.

  • Committer: Jamie Strandboge
  • Date: 2019-04-03 22:43:41 UTC
  • Revision ID: jamie@ubuntu.com-20190403224341-yn5t738olnbv0o8v
sr_declaration.py: fix verification interface attributes that are lists

Due to an ambiguity in the snap declaration interfaces spec, snapd implemented
interface attributes one way and the review-tools another, which has caused
some iterations on this check.

Fix a regression introduced in r1208 that broke interface attribute tests when
the attribute is a list, and fix the testsuite to catch this in the future (the
tests incorrectly mocked the snap.yaml as strings and the snap decl as lists
when it should have been the other way around, so this wasn't caught).

Don't support lists in the declaration for interface attributes since while
tecnically supported via recursion in snapd, they are impractical and unused in
practice. Add a clarifying comment for this.

Remove some tests introduced in r1208 to test this impractical condition since
the previous code was wrong and the tests impractical. Only test that we raise
an exception in this impractical case.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: