Sha256: 8e8266b81b386ef8996df108d9eb3ed3387c27d4a065cd348523dcc41dad04ee

Contents?: true

Size: 1 KB

Versions: 85

Compression:

Stored size: 1 KB

Contents

test_name 'use the exec subcommand' do

  def delete_root_folder_contents
    on default, 'rm -rf /root/* /root/.beaker'
  end

  step 'ensure the workspace is clean' do
    delete_root_folder_contents
  end

  step 'run init and provision to set up the system' do
    on default, 'beaker init --hosts centos6-64; beaker provision'
    subcommand_state = on(default, 'cat .beaker/.subcommand_state.yaml').stdout
    subcommand_state = YAML.parse(subcommand_state).to_ruby
    assert_equal(true, subcommand_state['provisioned'])
  end

  step 'create a test dir and populate it with tests' do
    on default, 'mkdir -p testing_dir'
  end

  step 'create remote test file' do
    testfile = <<-TESTFILE
    on(agents, 'echo hello world')
    TESTFILE
    create_remote_file(default, '/root/testing_dir/testfile1.rb', testfile)
  end

  step 'specify that remote file with beaker exec' do
    result = on(default, 'beaker exec testing_dir/testfile1.rb --log-level verbose')
    assert_match(/hello world/, result.stdout)
  end
end

Version data entries

85 entries across 85 versions & 1 rubygems

Version Path
beaker-3.37.0 acceptance/tests/subcommands/exec.rb
beaker-3.36.0 acceptance/tests/subcommands/exec.rb
beaker-3.35.0 acceptance/tests/subcommands/exec.rb
beaker-3.34.0 acceptance/tests/subcommands/exec.rb
beaker-3.33.0 acceptance/tests/subcommands/exec.rb
beaker-3.32.0 acceptance/tests/subcommands/exec.rb
beaker-3.31.0 acceptance/tests/subcommands/exec.rb
beaker-3.30.0 acceptance/tests/subcommands/exec.rb
beaker-3.29.0 acceptance/tests/subcommands/exec.rb
beaker-3.28.0 acceptance/tests/subcommands/exec.rb
beaker-3.27.0 acceptance/tests/subcommands/exec.rb
beaker-3.26.0 acceptance/tests/subcommands/exec.rb
beaker-3.25.0 acceptance/tests/subcommands/exec.rb
beaker-3.24.0 acceptance/tests/subcommands/exec.rb
beaker-3.23.0 acceptance/tests/subcommands/exec.rb
beaker-3.22.0 acceptance/tests/subcommands/exec.rb
beaker-3.21.1 acceptance/tests/subcommands/exec.rb
beaker-3.21.0 acceptance/tests/subcommands/exec.rb
beaker-3.20.0 acceptance/tests/subcommands/exec.rb
beaker-3.19.0 acceptance/tests/subcommands/exec.rb