aboutsummaryrefslogtreecommitdiffstats
path: root/spec/acceptance
diff options
context:
space:
mode:
authorFeng Pan <fpan@redhat.com>2016-11-07 19:22:21 -0500
committerFeng Pan <fpan@redhat.com>2016-11-21 21:27:09 -0500
commit9326e4237f4d161f297dc4493ab4928ea6e2bf0f (patch)
tree25372fa964fe84b160c5bfc58304285902edbefc /spec/acceptance
parentc70bea9fb9cd5dfb29d7ab8f7aaae7324c31f1e3 (diff)
Initial Commit.
Change-Id: I212ec4be42357edddd931e9e479e33131ccd4bac Signed-off-by: Feng Pan <fpan@redhat.com>
Diffstat (limited to 'spec/acceptance')
-rw-r--r--spec/acceptance/fdio_spec.rb51
-rw-r--r--spec/acceptance/honeycomb_spec.rb33
-rw-r--r--spec/acceptance/nodesets/centos-70-x64.yml11
-rw-r--r--spec/acceptance/nodesets/default.yml10
-rw-r--r--spec/acceptance/nodesets/nodepool-centos7.yml10
-rw-r--r--spec/acceptance/nodesets/nodepool-trusty.yml10
-rw-r--r--spec/acceptance/nodesets/nodepool-xenial.yml10
-rw-r--r--spec/acceptance/nodesets/ubuntu-server-1404-x64.yml11
8 files changed, 146 insertions, 0 deletions
diff --git a/spec/acceptance/fdio_spec.rb b/spec/acceptance/fdio_spec.rb
new file mode 100644
index 0000000..5c30de1
--- /dev/null
+++ b/spec/acceptance/fdio_spec.rb
@@ -0,0 +1,51 @@
+require 'spec_helper_acceptance'
+
+describe 'fdio' do
+
+ context 'default parameters' do
+
+ it 'should work with no errors' do
+ pp= <<-EOS
+ class { '::fdio': }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true)
+ apply_manifest(pp, :catch_changes => true)
+ end
+
+ describe package('vpp') do
+ it { should be_installed }
+ end
+
+ describe file('/etc/vpp/startup.conf') do
+ it { is_expected.to exist }
+ its(:content) { should match /uio-driver\s+uio_pci_generic/ }
+ its(:content) { should_not match /dev/ }
+ end
+
+ describe service('vpp') do
+ it { should be_running }
+ it { should be_enabled }
+ end
+ end
+
+ context 'pinning' do
+ it 'should work with no errors' do
+ pp= <<-EOS
+ class { '::fdio':
+ vpp_cpu_main_core => '1',
+ vpp_cpu_corelist_workers => '2',
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true)
+ apply_manifest(pp, :catch_changes => true)
+ end
+
+ describe file('/etc/vpp/startup.conf') do
+ its(:content) { should match /main-core\s+1/ }
+ its(:content) { should match /corelist-workers\s+2/ }
+ end
+
+ end
+end
diff --git a/spec/acceptance/honeycomb_spec.rb b/spec/acceptance/honeycomb_spec.rb
new file mode 100644
index 0000000..426d3b9
--- /dev/null
+++ b/spec/acceptance/honeycomb_spec.rb
@@ -0,0 +1,33 @@
+require 'spec_helper_acceptance'
+
+describe 'fdio::honeycomb' do
+
+ describe 'default parameters' do
+ it 'should work with no errors' do
+ pp= <<-EOS
+ class { '::fdio::honeycomb': }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true)
+ apply_manifest(pp, :catch_changes => true)
+ end
+
+ describe package('honeycomb') do
+ it { should be_installed }
+ end
+
+ describe file('/opt/honeycomb/config/honeycomb.json') do
+ it { is_expected.to exist }
+ its(:content) { should match /"restconf-port":\s+8181/ }
+ its(:content) { should match /"restconf-websocket-port":\s+7779/ }
+ its(:content) { should match /"username":\s+"admin"/}
+ its(:content) { should match /"password":\s+"admin"/}
+ end
+
+ describe service('honeycomb') do
+ it { should be_running }
+ it { should be_enabled }
+ end
+ end
+
+end \ No newline at end of file
diff --git a/spec/acceptance/nodesets/centos-70-x64.yml b/spec/acceptance/nodesets/centos-70-x64.yml
new file mode 100644
index 0000000..5f097e9
--- /dev/null
+++ b/spec/acceptance/nodesets/centos-70-x64.yml
@@ -0,0 +1,11 @@
+HOSTS:
+ centos-server-70-x64:
+ roles:
+ - master
+ platform: el-7-x86_64
+ box: puppetlabs/centos-7.0-64-nocm
+ box_url: https://vagrantcloud.com/puppetlabs/centos-7.0-64-nocm
+ hypervisor: vagrant
+CONFIG:
+ log_level: debug
+ type: foss
diff --git a/spec/acceptance/nodesets/default.yml b/spec/acceptance/nodesets/default.yml
new file mode 100644
index 0000000..486b6a3
--- /dev/null
+++ b/spec/acceptance/nodesets/default.yml
@@ -0,0 +1,10 @@
+HOSTS:
+ ubuntu-server-14.04-amd64:
+ roles:
+ - master
+ platform: ubuntu-14.04-amd64
+ box: puppetlabs/ubuntu-14.04-64-nocm
+ box_url: https://vagrantcloud.com/puppetlabs/ubuntu-14.04-64-nocm
+ hypervisor: vagrant
+CONFIG:
+ type: foss
diff --git a/spec/acceptance/nodesets/nodepool-centos7.yml b/spec/acceptance/nodesets/nodepool-centos7.yml
new file mode 100644
index 0000000..c552874
--- /dev/null
+++ b/spec/acceptance/nodesets/nodepool-centos7.yml
@@ -0,0 +1,10 @@
+HOSTS:
+ centos-70-x64:
+ roles:
+ - master
+ platform: el-7-x86_64
+ hypervisor: none
+ ip: 127.0.0.1
+CONFIG:
+ type: foss
+ set_env: false
diff --git a/spec/acceptance/nodesets/nodepool-trusty.yml b/spec/acceptance/nodesets/nodepool-trusty.yml
new file mode 100644
index 0000000..9fc624e
--- /dev/null
+++ b/spec/acceptance/nodesets/nodepool-trusty.yml
@@ -0,0 +1,10 @@
+HOSTS:
+ ubuntu-14.04-amd64:
+ roles:
+ - master
+ platform: ubuntu-14.04-amd64
+ hypervisor: none
+ ip: 127.0.0.1
+CONFIG:
+ type: foss
+ set_env: false
diff --git a/spec/acceptance/nodesets/nodepool-xenial.yml b/spec/acceptance/nodesets/nodepool-xenial.yml
new file mode 100644
index 0000000..99dd318
--- /dev/null
+++ b/spec/acceptance/nodesets/nodepool-xenial.yml
@@ -0,0 +1,10 @@
+HOSTS:
+ ubuntu-16.04-amd64:
+ roles:
+ - master
+ platform: ubuntu-16.04-amd64
+ hypervisor: none
+ ip: 127.0.0.1
+CONFIG:
+ type: foss
+ set_env: false
diff --git a/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml b/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml
new file mode 100644
index 0000000..8001929
--- /dev/null
+++ b/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml
@@ -0,0 +1,11 @@
+HOSTS:
+ ubuntu-server-14.04-amd64:
+ roles:
+ - master
+ platform: ubuntu-14.04-amd64
+ box: puppetlabs/ubuntu-14.04-64-nocm
+ box_url: https://vagrantcloud.com/puppetlabs/ubuntu-14.04-64-nocm
+ hypervisor: vagrant
+CONFIG:
+ log_level: debug
+ type: foss