Merge lp://staging/~sinzui/juju-release-tools/validate-streams into lp://staging/juju-release-tools
Status: | Merged |
---|---|
Merged at revision: | 91 |
Proposed branch: | lp://staging/~sinzui/juju-release-tools/validate-streams |
Merge into: | lp://staging/juju-release-tools |
Diff against target: |
459 lines (+438/-1) 3 files modified
tests/test_make_release_notes.py (+1/-1) tests/test_validate_streams.py (+234/-0) validate_streams.py (+203/-0) |
To merge this branch: | bzr merge lp://staging/~sinzui/juju-release-tools/validate-streams |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Aaron Bentley (community) | Approve | ||
Review via email: mp+237975@code.staging.launchpad.net |
Description of the change
This branch adds a script that can compare the product items in two streams files and verify that the expected changes exist, that there are no missing or extra items, and that the common items are the same. The script ensures that non-numeric version cannot be in the proposed and release json
Nothing uses this script at this time.
The command line is purpose, new-version old-json, new-json. I compared the release to the proposed json like this to verify that 1.20.10 is the only change between them
./juju-
Comparing old with itself, but expecting 1.20.10 change is an error because the tools are missing
./juju-
I will use this script in assemble-streams in the future.
I am finding it very hard to understand check_expected_ tools. I don't know why it will accept version and then basically ignore it if retracted is set. It seems like retracted is really a mode, not a parameter. I would like to see a test like this:
old_tools = make_tools_ data('trusty' , 'amd64', ['1.20.7', '1.20.9']) data('trusty' , 'amd64', ['1.20.7', '1.20.8']) tools(old_ tools, new_tools, '1.20.8', '1.20.9')
new_tools = make_tools_
check_expected_
Notice that 1.20.8 has been added and 1.20.9 has been removed. I don't know what the expected behaviour is. I think the actual behaviour is that it will complain that 1.20.8 is unexpected.