summaryrefslogtreecommitdiffstats
path: root/sdc-os-chef/sdc-os-common/spec
diff options
context:
space:
mode:
authorMichael Lando <ml636r@att.com>2017-06-19 19:51:24 +0300
committerMichael Lando <ml636r@att.com>2017-06-19 19:54:06 +0300
commit6e60006d2e22665b491d176ca9e91b74326bfabc (patch)
tree47e30ee9661e172e73f0e35bf198d5b3c70db8dd /sdc-os-chef/sdc-os-common/spec
parent4d97d5fac309ce0d66938e5ccd0349e2660d4e23 (diff)
[sdc] update to the current code base
and support http Change-Id: I2fb35494b40126a8395b1e309a180db4127754b7 Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'sdc-os-chef/sdc-os-common/spec')
-rw-r--r--sdc-os-chef/sdc-os-common/spec/spec_helper.rb2
-rw-r--r--sdc-os-chef/sdc-os-common/spec/unit/recipes/default_spec.rb22
2 files changed, 24 insertions, 0 deletions
diff --git a/sdc-os-chef/sdc-os-common/spec/spec_helper.rb b/sdc-os-chef/sdc-os-common/spec/spec_helper.rb
new file mode 100644
index 0000000000..1dd5126bf6
--- /dev/null
+++ b/sdc-os-chef/sdc-os-common/spec/spec_helper.rb
@@ -0,0 +1,2 @@
+require 'chefspec'
+require 'chefspec/berkshelf'
diff --git a/sdc-os-chef/sdc-os-common/spec/unit/recipes/default_spec.rb b/sdc-os-chef/sdc-os-common/spec/unit/recipes/default_spec.rb
new file mode 100644
index 0000000000..bd9841f76e
--- /dev/null
+++ b/sdc-os-chef/sdc-os-common/spec/unit/recipes/default_spec.rb
@@ -0,0 +1,22 @@
+#
+# Cookbook:: sdc-os-common
+# Spec:: default
+#
+# Copyright:: 2017, The Authors, All Rights Reserved.
+
+require 'spec_helper'
+
+describe 'sdc-os-common::default' do
+ context 'When all attributes are default, on an Ubuntu 16.04' do
+ let(:chef_run) do
+ # for a complete list of available platforms and versions see:
+ # https://github.com/customink/fauxhai/blob/master/PLATFORMS.md
+ runner = ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04')
+ runner.converge(described_recipe)
+ end
+
+ it 'converges successfully' do
+ expect { chef_run }.to_not raise_error
+ end
+ end
+end