Multi-node beaker tests

asked 2015-03-19 17:09:40 -0600

Andy Pippin gravatar image

I am looking for a way to run different tests on different nodes of the test.

I can find documentation on how to run the same acceptance test on different nodes. For example, the below test makes sure the ssh daemon is running on every SUT, regardless of platform:

    [...]
  context "running sshd" do
    hosts.each do |node|
      sshd = case node['platform']
               when /windows|el-|redhat|centos|debian/
                 'sshd'
               else
                 'ssh'
             end
        describe service(sshd), :node => node do
          it { should be_running }
      end
    end
  end
    [...]

What I can't find is how to run different tests on different nodes where the System Under Test has different functionality. Something like:

    [...]
  context "running sshd" do
    hosts.each do |node|
      if node['hostname'].eql?('server') do
        /* run server tests */
      else
        /* run client tests */
      end
    end
  end
    [...]
edit retag flag offensive close merge delete