Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(MODULES-8081): add support for hkps:// protocol in apt::key #815

Merged
merged 5 commits into from
Oct 31, 2018
Merged

(MODULES-8081): add support for hkps:// protocol in apt::key #815

merged 5 commits into from
Oct 31, 2018

Conversation

simondeziel
Copy link

Add hkps:// to the list of protocols supported by apt::key
(hkp://, http:// and https://).

Add hkps:// to the list of protocols supported by apt::key
(hkp://, http:// and https://).
@simondeziel
Copy link
Author

https://travis-ci.org/puppetlabs/puppetlabs-apt/jobs/439464775 and https://travis-ci.org/puppetlabs/puppetlabs-apt/jobs/439464776 are failing because hpks started being supported in newer Debian/Ubuntu releases. I'm not sure how to update the tests to allow hkps:// only on recent distro versions.

@david22swan
Copy link
Member

david22swan commented Oct 12, 2018

@simondeziel I think the best thing to do in this instance is to but an exception around the test's so that their only run on the machines that support hkps, and add a note into the readme which which reflects this limitation.
Maybe put an error message into the manifest that triggers if you try to use hkps on an unsupported machine.

@david22swan
Copy link
Member

@simondeziel Your changes are currently failing on a syntax check, heres the test output:

Offenses:
spec/acceptance/apt_key_provider_spec.rb:481:1: C: Style/ConditionalAssignment: Use the return of the conditional for variable assignment and comparison.
if fact('operatingsystem') =~ %r{Ubuntu} and fact('operatingsystemrelease') =~ %r{^18\.04} ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/acceptance/apt_key_provider_spec.rb:481:42: C: Style/AndOr: Use && instead of and. (https://github.com/bbatsov/ruby-style-guide#no-and-or-or)
if fact('operatingsystem') =~ %r{Ubuntu} and fact('operatingsystemrelease') =~ %r{^18\.04}
                                         ^^^

@david22swan
Copy link
Member

@simondeziel Also, the documentation in the key.pp file still need's to be updated. Everything else looks good to me though.

@simondeziel
Copy link
Author

simondeziel commented Oct 19, 2018

@david22swan, I don't understand how to fix this:

spec/acceptance/apt_key_provider_spec.rb:481:1: C: Style/ConditionalAssignment: Use the return of the conditional for variable assignment and comparison.
if fact('operatingsystem') =~ %r{Ubuntu} && fact('operatingsystemrelease') =~ %r{^18\.04} ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Could you walk me through it or point me to a style guide, please? Thanks

@simondeziel
Copy link
Author

@david22swan, please let me know if something's missing.

@david22swan
Copy link
Member

screen shot 2018-10-31 at 11 58 19 am

@david22swan
Copy link
Member

@simondeziel runs clean on adhoc so i'm happy to merge. Sorry for the wait, was out on holiday.

@david22swan david22swan merged commit 44c9018 into puppetlabs:master Oct 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants