Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'highline/import'
- require 'net/ssh'
- RSpec.configure do |c|
- c.before(:example, :host => :hello) do
- set :backend, 'ssh'
- set :host, 'hello.learning.puppetlabs.vm'
- options = {password: "puppet", user: "root"}
- set :ssh_options, options
- end
- c.before(:example, :host => :master) do
- set :backend, 'exec'
- set :host, 'localhost'
- end
- end
- describe "Task 1:", host: :hello do
- set :backend, 'ssh'
- set :host, 'hello.learning.puppetlabs.vm'
- options = {password: "puppet", user: "root"}
- set :ssh_options, options
- it 'Use puppet -V to check the puppet version' do
- file('/tmp/test')
- .should be_file
- end
- end
- describe "Task 2:", host: :master do
- set :backend, 'exec'
- set :host, 'localhost'
- it 'View the options for the quest tool' do
- file('/root/.bash_history')
- .content
- .should match /quest\s+(-h|--help)/
- end
- end
- describe "Task 3:", host: :master do
- it 'Check the quest status' do
- file('/root/.bash_history')
- .content
- .should match /quest\s+status/
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement