diff options
author | Feng Pan <fpan@redhat.com> | 2017-03-22 10:20:43 -0400 |
---|---|---|
committer | Feng Pan <fpan@redhat.com> | 2017-04-22 00:24:57 -0400 |
commit | a9b8980b5b933d1b09134ff1ab2d7601d76c40c2 (patch) | |
tree | 6a8954f02e651210bbac8295781d440df0d8cc98 /spec | |
parent | bb2d937d418b9353fd6f294978c23f5908d2e366 (diff) |
Add parameter for dpdk-plugin support
DPDK is now an optional plugin shipped in vpp-plugins package, adding
parameter vpp_dpdk_support which defaults to true to support configuration
of DPDK related options.
JIRA: PUP-2
Change-Id: Ie033e2b6cd871c8f8b644499a0283949a0039bf6
Signed-off-by: Feng Pan <fpan@redhat.com>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/acceptance/fdio_spec.rb | 5 | ||||
-rw-r--r-- | spec/acceptance/honeycomb_spec.rb | 1 | ||||
-rw-r--r-- | spec/classes/fdio_spec.rb | 1 | ||||
-rw-r--r-- | spec/spec_helper_acceptance.rb | 41 |
4 files changed, 46 insertions, 2 deletions
diff --git a/spec/acceptance/fdio_spec.rb b/spec/acceptance/fdio_spec.rb index 168c085..3cc88ad 100644 --- a/spec/acceptance/fdio_spec.rb +++ b/spec/acceptance/fdio_spec.rb @@ -6,7 +6,9 @@ describe 'fdio' do it 'should work with no errors' do pp= <<-EOS - class { '::fdio': } + class { '::fdio': + repo_branch => 'master' + } EOS apply_manifest(pp, :catch_failures => true) @@ -26,6 +28,7 @@ describe 'fdio' do it { should be_running } it { should be_enabled } end + end context 'pinning' do diff --git a/spec/acceptance/honeycomb_spec.rb b/spec/acceptance/honeycomb_spec.rb index 426d3b9..012693b 100644 --- a/spec/acceptance/honeycomb_spec.rb +++ b/spec/acceptance/honeycomb_spec.rb @@ -28,6 +28,7 @@ describe 'fdio::honeycomb' do it { should be_running } it { should be_enabled } end + end end
\ No newline at end of file diff --git a/spec/classes/fdio_spec.rb b/spec/classes/fdio_spec.rb index 4b65779..847bc08 100644 --- a/spec/classes/fdio_spec.rb +++ b/spec/classes/fdio_spec.rb @@ -41,6 +41,7 @@ describe 'fdio' do ) } it { should contain_package('vpp').that_requires('Yumrepo[fdio-stable.1609]') } + it { should contain_package('vpp-plugins').that_requires('Package[vpp]') } end end diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index 9196bc9..ea9b6dc 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -1 +1,40 @@ -require 'puppet-openstack_spec_helper/beaker_spec_helper' +require 'beaker-rspec' + +install_puppet_on(hosts, options) + +RSpec.configure do |c| + # Project root + proj_root = File.expand_path(File.join(Dir.getwd)) + module_name = JSON.parse(open('metadata.json').read)['name'].split('-')[1] + + # Make sure proj_root is the real project root + unless File.exists?("#{proj_root}/metadata.json") + raise "bundle exec rspec spec/acceptance needs be run from module root." + end + + # Readable test descriptions + c.formatter = :documentation + + # Configure all nodes in nodeset + c.before :suite do + # Install module and dependencies + hosts.each do |host| + # Start out with clean moduledir, don't trust r10k to purge it + on host, "rm -rf /etc/puppet/modules/*" + + # Make sure EPEL is not installed. + # It can happens in OpenStack Infra when using centos7 images. + if os[:family].casecmp('RedHat') == 0 + on host, "rpm -e epel-release || true" + end + + on(host, puppet('module', 'install', 'puppetlabs-stdlib')) + on(host, puppet('module', 'install', 'puppetlabs-dummy_service')) + + # Install the module being tested + on host, "rm -fr /etc/puppet/modules/#{module_name}" + puppet_module_install(:source => proj_root, :module_name => module_name) + + end + end +end
\ No newline at end of file |