Skip to content
This repository has been archived by the owner. It is now read-only.

Order of return values was reversed #5357

Merged
merged 1 commit into from Oct 22, 2016

Conversation

Projects
None yet
2 participants
@abadger
Copy link
Member

abadger commented Oct 22, 2016

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

apt_key.py

ANSIBLE VERSION
devel 2.2
SUMMARY

My previous fix to apt_key reversed the order of return values and therefore compared the wrong length of ids. This PR fixes that.

@ypid

ypid approved these changes Oct 22, 2016

Copy link

ypid left a comment

LGTM thanks! Fixes: #5237

@abadger abadger merged commit 1182d1f into ansible:devel Oct 22, 2016

1 check passed

Shippable Run 1979 status is SUCCESS.
Details

@abadger abadger deleted the abadger:apt-key-reversed-order branch Oct 22, 2016

@abadger abadger added this to the 2.2.0 milestone Oct 22, 2016

@abadger

This comment has been minimized.

Copy link
Member Author

abadger commented Oct 22, 2016

Thanks for testing @ypid! Sorry that I broke it immediately after fixing it before.

If you want to work on tests for apt_key, we have both integration and unit tests for modules. The integration tests are just ansible roles and live here: https://github.com/ansible/ansible/tree/devel/test/integration/targets You can look at how the apt tests are set up for ideas on how to setup the apt_key tests.

unittests live here: https://github.com/ansible/ansible/tree/devel/test/units/modules/core I've mostly used those for very algorithmic code. (The function that splits up key_id into 8, 16, and everything segments would be something easily tested via the unittests).

@abadger

This comment has been minimized.

Copy link
Member Author

abadger commented Oct 22, 2016

Merged to devel and stable-2.2 branches. This should be in the 2.2.0 release.

@ypid

This comment has been minimized.

Copy link

ypid commented Oct 22, 2016

@abadger Thanks for your work. I will look into unit testing when I come around to submit a new Ansible module but I can not promise it. For now, i pass, sorry.

abadger added a commit that referenced this pull request Oct 24, 2016

Backport the newest revision of apt_key from 2.2
apt_key has some handling of key ids that can be security concerns.

See this issue:
#5237

and this pair of PRs:
#5353
#5357

abadger added a commit that referenced this pull request Oct 24, 2016

Backport 2.2 version of apt_key to 1.9 to fix security issues
apt_key has some handling of key ids that can be security concerns.

See this issue:
#5237

and this pair of PRs:
#5353
#5357
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.