-
-
Notifications
You must be signed in to change notification settings - Fork 124
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
Replace staging module with archive module #128
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,18 @@ | ||
require 'beaker-rspec/spec_helper' | ||
require 'beaker-rspec/helpers/serverspec' | ||
require 'beaker/puppet_install_helper' | ||
require 'beaker/module_install_helper' | ||
|
||
run_puppet_install_helper unless ENV['BEAKER_provision'] == 'no' | ||
install_module | ||
install_module_dependencies | ||
|
||
RSpec.configure do |c| | ||
# Project root | ||
proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) | ||
|
||
# Readable test descriptions | ||
c.formatter = :documentation | ||
|
||
# Configure all nodes in nodeset | ||
c.before :suite do | ||
# Install module and dependencies | ||
# Need to stage the Splunk/Splunkforwarder packages here. | ||
puppet_module_install(source: proj_root, module_name: 'splunk') | ||
hosts.each do |host| | ||
on host, puppet('module', 'install', 'puppetlabs-stdlib'), acceptable_exit_codes: [0, 1] | ||
on host, puppet('module', 'install', 'nanliu-staging'), acceptable_exit_codes: [0, 1] | ||
on host, puppet('module', 'install', 'puppetlabs-inifile'), acceptable_exit_codes: [0, 1] | ||
on host, puppet('module', 'install', 'puppetlabs-concat'), acceptable_exit_codes: [0, 1] | ||
end | ||
end | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
require 'rspec-system/spec_helper' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll get that as well. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
require 'rspec-system-puppet/helpers' | ||
require 'rspec-system-serverspec/helpers' | ||
include RSpecSystemPuppet::Helpers | ||
|
||
RSpec.configure do |c| | ||
# Project root | ||
proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) | ||
|
||
# Enable colour | ||
c.tty = true | ||
|
||
c.include RSpecSystemPuppet::Helpers | ||
|
||
# This is where we 'setup' the nodes before running our tests | ||
c.before :suite do | ||
# Install puppet | ||
puppet_install | ||
|
||
# Install modules and dependencies | ||
puppet_module_install(source: proj_root, module_name: 'splunk') | ||
shell('puppet module install puppet-archive --version 2.0.0') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. btw, it seems like this is for https://github.com/puppetlabs/rspec-system, which is deprecated and presumably not in use now that the module has beaker based acceptance tests There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No Longer applicable There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please take a look at the spec_helper_acceptance here: install_module_dependencies installs all modules from the metadata.json, install_module_from_forge is for additional dependencies. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. After #136 is merged i can do this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bastelfreak Done. |
||
shell('puppet module install puppetlabs-stdlib --version 3.0.0') | ||
shell('puppet module install puppetlabs-inifile --version 1.0.0') | ||
shell('puppet module install puppetlabs-concat --version 4.0.0') | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no such variable as $archive::path
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @alexjfisher It does work but i might be accessing this the wrong way from the puppet archive module
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My mistake. I missed the
inherits
https://github.com/voxpupuli/puppet-archive/blob/master/manifests/init.pp#L28There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The staging module created $staging::path for you. With archive, I think you'll need to
include ::archive::staging
instead of just::archive
??There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also needed in
forwarder.pp
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done