summaryrefslogtreecommitdiff
path: root/acceptance
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2016-02-08 07:44:16 -0800
committerSalim Alam <salam@chef.io>2016-02-09 15:05:05 -0800
commitc78a629699401b5ccc9d4c46e76ea5ad1b848493 (patch)
tree8c3bcf1204e0028fceee26e8d94e2f69b016a8f1 /acceptance
parentb4a0661e75108b641621e687d083dad1793334a0 (diff)
downloadchef-c78a629699401b5ccc9d4c46e76ea5ad1b848493.tar.gz
Make it go
Diffstat (limited to 'acceptance')
-rw-r--r--acceptance/.shared/kitchen_acceptance/.kitchen.ec2.yml108
-rw-r--r--acceptance/top-cookbooks/.acceptance/acceptance-cookbook/libraries/cookbook_kitchen.rb22
-rw-r--r--acceptance/top-cookbooks/.acceptance/acceptance-cookbook/recipes/destroy.rb5
-rw-r--r--acceptance/top-cookbooks/.acceptance/acceptance-cookbook/recipes/provision.rb6
-rw-r--r--acceptance/top-cookbooks/.acceptance/acceptance-cookbook/recipes/verify.rb5
-rw-r--r--acceptance/top-cookbooks/.kitchen.yml20
6 files changed, 89 insertions, 77 deletions
diff --git a/acceptance/.shared/kitchen_acceptance/.kitchen.ec2.yml b/acceptance/.shared/kitchen_acceptance/.kitchen.ec2.yml
index fc82c907e6..89925c0f07 100644
--- a/acceptance/.shared/kitchen_acceptance/.kitchen.ec2.yml
+++ b/acceptance/.shared/kitchen_acceptance/.kitchen.ec2.yml
@@ -44,7 +44,7 @@ platforms:
driver:
image_search:
name: debian-jessie-*
- owner-id: 379101102735
+ owner-id: "379101102735"
architecture: x86_64
virtualization-type: hvm
block-device-mapping.volume-type: gp2
@@ -55,7 +55,7 @@ platforms:
driver:
image_search:
name: debian-wheezy-*
- owner-id: 379101102735
+ owner-id: "379101102735"
architecture: x86_64
virtualization-type: hvm
block-device-mapping.volume-type: standard
@@ -69,7 +69,7 @@ platforms:
driver:
image_search:
name: ubuntu/images/*/ubuntu-*-15.10-amd64-server-*
- owner-id: 099720109477
+ owner-id: "099720109477"
architecture: x86_64
virtualization-type: hvm
block-device-mapping.volume-type: gp2
@@ -80,24 +80,24 @@ platforms:
driver:
image_search:
name: ubuntu/images/*/ubuntu-*-14.04-*-server-*
- owner-id: 099720109477
+ owner-id: "099720109477"
+ architecture: x86_64
+ virtualization-type: hvm
+ block-device-mapping.volume-type: gp2
+ image-type: machine
+ transport:
+ username: ubuntu
+ - name: ubuntu-12.04
+ driver:
+ image_search:
+ name: ubuntu/images/*/ubuntu-*-12.04-*-server-*
+ owner-id: "099720109477"
architecture: x86_64
virtualization-type: hvm
block-device-mapping.volume-type: gp2
image-type: machine
transport:
username: ubuntu
- # - name: ubuntu-12.04
- # driver:
- # image_search:
- # name: ubuntu/images/*/ubuntu-*-12.04-*-server-*
- # owner-id: 099720109477
- # architecture: x86_64
- # virtualization-type: hvm
- # block-device-mapping.volume-type: gp2
- # image-type: machine
- # transport:
- # username: ubuntu
#
# Red Hat Enterprise Linux
#
@@ -105,7 +105,7 @@ platforms:
driver:
image_search:
name: RHEL-7.*
- owner-id: 309956199498
+ owner-id: "309956199498"
architecture: x86_64
virtualization-type: hvm
block-device-mapping.volume-type: gp2
@@ -116,7 +116,7 @@ platforms:
driver:
image_search:
name: RHEL-6.*
- owner-id: 309956199498
+ owner-id: "309956199498"
architecture: x86_64
virtualization-type: hvm
block-device-mapping.volume-type: gp2
@@ -127,7 +127,7 @@ platforms:
driver:
image_search:
name: RHEL-5.*
- owner-id: 309956199498
+ owner-id: "309956199498"
architecture: x86_64
virtualization-type: paravirtual
block-device-mapping.volume-type: gp2
@@ -141,7 +141,7 @@ platforms:
driver:
image_search:
name: FreeBSD/EC2 10.*-RELEASE*
- owner-id: 118940168514
+ owner-id: "118940168514"
architecture: x86_64
virtualization-type: hvm
block-device-mapping.volume-type: gp2
@@ -152,24 +152,24 @@ platforms:
driver:
image_search:
name: FreeBSD/EC2 9.*-RELEASE*
- owner-id: 118940168514
+ owner-id: "118940168514"
architecture: x86_64
virtualization-type: hvm
block-device-mapping.volume-type: gp2
image-type: machine
transport:
username: ec2-user
- # - name: freebsd-8
- # driver:
- # image_search:
- # name: FreeBSD/EC2 8.*-RELEASE*
- # owner-id: 118940168514
- # architecture: x86_64
- # virtualization-type: hvm
- # block-device-mapping.volume-type: standard
- # image-type: machine
- # transport:
- # username: ec2-user
+ - name: freebsd-8
+ driver:
+ image_search:
+ name: FreeBSD/EC2 8.*-RELEASE*
+ owner-id: "118940168514"
+ architecture: x86_64
+ virtualization-type: hvm
+ block-device-mapping.volume-type: standard
+ image-type: machine
+ transport:
+ username: ec2-user
#
# OS/X
#
@@ -243,28 +243,28 @@ platforms:
#
# Centos
#
- # - name: centos-7
- # driver:
- # image_search:
- # name: CentOS Linux 7 *
- # owner-alias: aws-marketplace
- # architecture: x86_64
- # virtualization-type: hvm
- # block-device-mapping.volume-type: standard
- # image-type: machine
- # transport:
- # username: root
- # - name: centos-6
- # driver:
- # image_search:
- # name: CentOS-6.5-GA-*
- # owner-alias: aws-marketplace
- # architecture: x86_64
- # virtualization-type: paravirtual
- # block-device-mapping.volume-type: standard
- # image-type: machine
- # transport:
- # username: root
+ - name: centos-7
+ driver:
+ image_search:
+ name: CentOS Linux 7 *
+ owner-alias: aws-marketplace
+ architecture: x86_64
+ virtualization-type: hvm
+ block-device-mapping.volume-type: standard
+ image-type: machine
+ transport:
+ username: root
+ - name: centos-6
+ driver:
+ image_search:
+ name: CentOS-6.5-GA-*
+ owner-alias: aws-marketplace
+ architecture: x86_64
+ virtualization-type: paravirtual
+ block-device-mapping.volume-type: standard
+ image-type: machine
+ transport:
+ username: root
#
# Fedora
#
@@ -272,7 +272,7 @@ platforms:
driver:
image_search:
name: Fedora-Cloud-Base-21-*
- owner-id: 125523088429
+ owner-id: "125523088429"
architecture: x86_64
virtualization-type: hvm
block-device-mapping.volume-type: gp2
diff --git a/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/libraries/cookbook_kitchen.rb b/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/libraries/cookbook_kitchen.rb
index c2d65b4b0c..0f9982f9ad 100644
--- a/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/libraries/cookbook_kitchen.rb
+++ b/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/libraries/cookbook_kitchen.rb
@@ -2,9 +2,9 @@ class CookbookKitchen < KitchenAcceptance::Kitchen
resource_name :cookbook_kitchen
property :command, default: lazy { name.split(" ")[0] }
- property :test_cookbook, default: lazy { name.split(" ")[1] }
- property :kitchen_dir, default: lazy { ::File.join(Chef.node["chef-acceptance"]["suite-dir"], "test_run", test_cookbook) }
- property :repository, default: lazy { "chef-cookbooks/#{test_cookbook}" },
+ property :kitchen_dir, default: lazy { ::File.join(repository_root, cookbook_relative_dir) }
+ property :test_cookbook, String, default: lazy { name.split(" ")[1] }
+ property :repository, String, default: lazy { "chef-cookbooks/#{test_cookbook}" },
coerce: proc { |v|
# chef-cookbooks/runit -> https://github.com/chef-cookbooks/runit.git
if !v.include?(':')
@@ -13,7 +13,9 @@ class CookbookKitchen < KitchenAcceptance::Kitchen
v
end
}
- property :branch, default: "master"
+ property :repository_root, String, default: lazy { ::File.join(Chef.node["chef-acceptance"]["suite-dir"], "test_run", test_cookbook) }
+ property :branch, String, default: "master"
+ property :cookbook_relative_dir, String
property :env, default: lazy {
{
"BUNDLE_GEMFILE" => ::File.expand_path("../Gemfile", Chef.node["chef-acceptance"]["suite-dir"]),
@@ -25,15 +27,17 @@ class CookbookKitchen < KitchenAcceptance::Kitchen
action :run do
if command == "converge"
# Ensure the parent directory exists
- directory ::File.expand_path("..", kitchen_dir)
+ directory ::File.expand_path("..", repository_root) do
+ recursive true
+ end
# Grab the cookbook
# TODO Grab the source URL from supermarket
# TODO get git to include its kitchen tests in the cookbook.
- git kitchen_dir do
- repository new_resource.repository
- branch new_resource.branch
- end
+ # git repository_root do
+ # repository new_resource.repository
+ # branch new_resource.branch
+ # end
end
super()
diff --git a/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/recipes/destroy.rb b/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/recipes/destroy.rb
index 35af0e020c..497cd261f5 100644
--- a/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/recipes/destroy.rb
+++ b/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/recipes/destroy.rb
@@ -1 +1,4 @@
-cookbook_kitchen "destroy git"
+cookbook_kitchen "destroy learn-the-basics-rhel" do
+ repository "learn-chef/learn-chef-acceptance"
+ cookbook_relative_dir "cookbooks/learn-the-basics-rhel"
+end
diff --git a/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/recipes/provision.rb b/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/recipes/provision.rb
index 8e87a548e3..89a09c291e 100644
--- a/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/recipes/provision.rb
+++ b/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/recipes/provision.rb
@@ -1,2 +1,4 @@
-# Run the test on the current platform
-cookbook_kitchen "converge git"
+cookbook_kitchen "converge learn-the-basics-rhel" do
+ repository "learn-chef/learn-chef-acceptance"
+ cookbook_relative_dir "cookbooks/learn-the-basics-rhel"
+end
diff --git a/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/recipes/verify.rb b/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/recipes/verify.rb
index ddc5d27514..4b2dc19212 100644
--- a/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/recipes/verify.rb
+++ b/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/recipes/verify.rb
@@ -1 +1,4 @@
-cookbook_kitchen "verify git"
+cookbook_kitchen "verify learn-the-basics-rhel" do
+ repository "learn-chef/learn-chef-acceptance"
+ cookbook_relative_dir "cookbooks/learn-the-basics-rhel"
+end
diff --git a/acceptance/top-cookbooks/.kitchen.yml b/acceptance/top-cookbooks/.kitchen.yml
index 4f4e15807f..cd5133cb8a 100644
--- a/acceptance/top-cookbooks/.kitchen.yml
+++ b/acceptance/top-cookbooks/.kitchen.yml
@@ -1,12 +1,12 @@
suites:
- - name: git-default
- run_list: ["recipe[git]"]
- includes: [ubuntu-14.04]
- - name: git-source
- run_list: ["recipe[git::source]"]
- includes: [nonexistent]
- - name: git-default-windows
- run_list: ["recipe[git]"]
- includes: [windows-2012r2]
- # - name: learn-the-basics-windows
+ # - name: git-default
+ # run_list: ["recipe[git]"]
+ # includes: [ubuntu-14.04]
+ # - name: git-source
+ # run_list: ["recipe[git::source]"]
+ # includes: [nonexistent]
+ # - name: git-default-windows
+ # run_list: ["recipe[git]"]
# includes: [windows-2012r2]
+ - name: learn-the-basics-rhel
+ includes: [el-6]