diff options
author | Claire McQuin <claire@getchef.com> | 2014-07-29 13:26:58 -0700 |
---|---|---|
committer | Claire McQuin <claire@getchef.com> | 2014-08-12 08:39:02 -0700 |
commit | 7186181f62b1928a9fefb72a3612ad6129d1af51 (patch) | |
tree | 83707b96d54c4b5be6e41df0ef648e6b963a54c0 | |
parent | 1c9f80d0141afd45cfd8961b50c34f3c80f3be74 (diff) | |
download | chef-7186181f62b1928a9fefb72a3612ad6129d1af51.tar.gz |
Add example test for installed git.
-rw-r--r-- | spec/e2e/.kitchen.travis.yml | 13 | ||||
-rw-r--r-- | spec/e2e/.kitchen.yml | 2 | ||||
-rw-r--r-- | spec/e2e/Berksfile | 2 | ||||
-rw-r--r-- | spec/e2e/cookbooks/git-cookbook/README.md | 3 | ||||
-rw-r--r-- | spec/e2e/cookbooks/git-cookbook/metadata.rb | 7 | ||||
-rw-r--r-- | spec/e2e/cookbooks/git-cookbook/recipes/default.rb | 9 | ||||
-rw-r--r-- | spec/e2e/cookbooks/git-cookbook/test/integration/default/rspec/spec_helper.rb | 0 | ||||
-rw-r--r-- | spec/e2e/cookbooks/git-cookbook/test/integration/default/rspec/unit/git_installed_spec.rb | 13 |
8 files changed, 35 insertions, 14 deletions
diff --git a/spec/e2e/.kitchen.travis.yml b/spec/e2e/.kitchen.travis.yml index 60e6cfc5f4..f54414c8dc 100644 --- a/spec/e2e/.kitchen.travis.yml +++ b/spec/e2e/.kitchen.travis.yml @@ -7,13 +7,8 @@ driver_config: provisioner: name: chef_solo -<<<<<<< HEAD github: <%= ENV['TRAVIS_REPO_SLUG'] %> branch: <%= ENV['TRAVIS_COMMIT'] %> -======= - chef_git_sha: <%= ENV['TRAVIS_COMMIT'] %> - chef_git_url: github.com/<%= ENV['TRAVIS_REPO_SLUG'] %> ->>>>>>> 6cbc5b3... Separate .kitchen.ymls for local TK (vagrant) and travis TK (ec2) runs require_chef_omnibus: true platforms: @@ -22,19 +17,11 @@ platforms: driver_config: region: "us-west-2" availability_zone: "us-west-2b" -<<<<<<< HEAD ssh_key: ~/<%= ENV['EC2_SSH_KEY_PATH'] %> -======= - ssh_key: <%= ENV['EC2_SSH_KEY_PATH'] %> ->>>>>>> 6cbc5b3... Separate .kitchen.ymls for local TK (vagrant) and travis TK (ec2) runs security_group_ids: ["travis-ci"] suites: - name: default run_list: -<<<<<<< HEAD - recipe[git-cookbook::default] -======= - - recipe[example::default] ->>>>>>> 6cbc5b3... Separate .kitchen.ymls for local TK (vagrant) and travis TK (ec2) runs attributes: diff --git a/spec/e2e/.kitchen.yml b/spec/e2e/.kitchen.yml index 7e03773f42..543c0139c1 100644 --- a/spec/e2e/.kitchen.yml +++ b/spec/e2e/.kitchen.yml @@ -12,5 +12,5 @@ platforms: suites: - name: default run_list: - - recipe[example::default] + - recipe[git-cookbook::default] attributes: diff --git a/spec/e2e/Berksfile b/spec/e2e/Berksfile index 964bbfb644..fad6f7f9c0 100644 --- a/spec/e2e/Berksfile +++ b/spec/e2e/Berksfile @@ -1 +1,3 @@ source "https://supermarket.getchef.com" + +cookbook 'git-cookbook', :path => 'cookbooks/git-cookbook' diff --git a/spec/e2e/cookbooks/git-cookbook/README.md b/spec/e2e/cookbooks/git-cookbook/README.md new file mode 100644 index 0000000000..4431091bc1 --- /dev/null +++ b/spec/e2e/cookbooks/git-cookbook/README.md @@ -0,0 +1,3 @@ +# git-cookbook + +TODO: Enter the cookbook description here. diff --git a/spec/e2e/cookbooks/git-cookbook/metadata.rb b/spec/e2e/cookbooks/git-cookbook/metadata.rb new file mode 100644 index 0000000000..9c2e5b8c7c --- /dev/null +++ b/spec/e2e/cookbooks/git-cookbook/metadata.rb @@ -0,0 +1,7 @@ +name 'git-cookbook' +maintainer '' +maintainer_email '' +license '' +description 'Installs/Configures example' +long_description 'Installs/Configures example' +version '0.1.0' diff --git a/spec/e2e/cookbooks/git-cookbook/recipes/default.rb b/spec/e2e/cookbooks/git-cookbook/recipes/default.rb new file mode 100644 index 0000000000..1203f7465e --- /dev/null +++ b/spec/e2e/cookbooks/git-cookbook/recipes/default.rb @@ -0,0 +1,9 @@ +# +# Cookbook Name:: git-cookbook +# Recipe:: default +# +# Copyright (C) 2014 +# +# + +package 'git' diff --git a/spec/e2e/cookbooks/git-cookbook/test/integration/default/rspec/spec_helper.rb b/spec/e2e/cookbooks/git-cookbook/test/integration/default/rspec/spec_helper.rb new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/spec/e2e/cookbooks/git-cookbook/test/integration/default/rspec/spec_helper.rb diff --git a/spec/e2e/cookbooks/git-cookbook/test/integration/default/rspec/unit/git_installed_spec.rb b/spec/e2e/cookbooks/git-cookbook/test/integration/default/rspec/unit/git_installed_spec.rb new file mode 100644 index 0000000000..3a2c3f971c --- /dev/null +++ b/spec/e2e/cookbooks/git-cookbook/test/integration/default/rspec/unit/git_installed_spec.rb @@ -0,0 +1,13 @@ + +require 'spec_helper' + +require 'chef/mixin/shell_out' + +describe "git-cookbook cookbook" do + include Chef::Mixin::ShellOut + + it "should install git" do + so = shell_out('which git') + so.exitstatus.should == 0 + end +end |