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

moving parameters into appropriate place, adding meaning unit test, f… #2

Merged
merged 3 commits into from
Jan 14, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .fixtures.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
fixtures:
forge_modules:
stdlib: puppetlabs/stdlib
apt: puppetlabs/apt
yum: puppet/yum
repositories:
apt: "https://github.com/puppetlabs/puppetlabs-apt.git"
stdlib: "https://github.com/puppetlabs/puppetlabs-stdlib.git"
yum: "https://github.com/voxpupuli/puppet-yum.git"
yumrepo_core:
repo: puppetlabs/yumrepo_core
repo: "https://github.com/puppetlabs/puppetlabs-yumrepo_core.git"
puppet_version: ">= 6.0.0"
7 changes: 5 additions & 2 deletions example/init.pp
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
class { 'hashi_stack::repo': }
-> package { 'packer': ensure => installed }
include hashi_stack::repo
package { 'packer':
ensure => installed,
require => Class['Hashi_stack::Repo'],
}
10 changes: 7 additions & 3 deletions manifests/repo.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
#
# @summary Set up the package repository for the HashiCorp Stack components
#
# @example
# @example Inclusion using defaults
# include hashi_stack::repo
#
# @example
# class { 'hashi_stack::repo': } -> package { 'packer': ensure => installed }
# @example Include repo and install packer as package
# include hashi_stack::repo
# package { 'packer':
# ensure => installed,
# require => Class['Hashi_stack::Repo'],
# }
#
# @param priority A numeric priority for the repo, passed to the package management system
# @param proxy The URL of a HTTP proxy to use for package downloads (YUM only)
Expand Down
6 changes: 5 additions & 1 deletion spec/acceptance/standard_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
# Using puppet_apply as a helper
it 'should work with no errors based on the example' do
pp = <<-EOS
class { 'hashi_stack::repo': } -> package { 'packer': ensure => installed }
include hashi_stack::repo
package { 'packer':
ensure => installed,
require => Class['Hashi_stack::Repo'],
}
Comment on lines +9 to +13
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, in the future I hope to expand voxpupuli-acceptance I hope to make it easier here to use example files. In theforeman we have shared examples for that.

EOS

# Run it twice and test for idempotency
Expand Down