Permalink
Browse files

Rename minimal to test and make it more wrapper like

The test cookbook should include windows::default itself. It's silly to have this on run lists directly

Signed-off-by: Tim Smith <tsmith@chef.io>
  • Loading branch information...
tas50 committed Aug 16, 2016
1 parent 17df850 commit 2d4e0728d9c1fd72c366f17a77fb010d932402b7
Showing with 49 additions and 77 deletions.
  1. +7 −15 .kitchen.appveyor.yml
  2. +5 −22 .kitchen.cloud.yml
  3. +9 −27 .kitchen.yml
  4. +1 −1 Berksfile
  5. +0 −2 test/cookbooks/minimal/metadata.rb
  6. 0 test/cookbooks/{minimal → test}/files/default/.!31272!CodeNewRoman.otf
  7. 0 test/cookbooks/{minimal → test}/files/default/.!31945!CodeNewRoman.otf
  8. 0 test/cookbooks/{minimal → test}/files/default/.!32892!CodeNewRoman.otf
  9. 0 test/cookbooks/{minimal → test}/files/default/.!34116!CodeNewRoman.otf
  10. 0 test/cookbooks/{minimal → test}/files/default/.!35617!CodeNewRoman.otf
  11. 0 test/cookbooks/{minimal → test}/files/default/.!62030!CodeNewRoman.otf
  12. BIN test/cookbooks/{minimal → test}/files/default/Asimov.otf
  13. BIN test/cookbooks/{minimal → test}/files/default/CodeNewRoman.otf
  14. 0 test/cookbooks/{minimal → test}/files/default/base64-cert2.cer
  15. BIN test/cookbooks/{minimal → test}/files/default/der-cert1.cer
  16. BIN test/cookbooks/{minimal → test}/files/default/test-cert.cer
  17. BIN test/cookbooks/{minimal → test}/files/default/test-cert.pfx
  18. BIN test/cookbooks/{minimal → test}/files/default/test-cert.pvk
  19. +3 −0 test/cookbooks/test/metadata.rb
  20. +5 −3 test/cookbooks/{minimal → test}/recipes/certificate.rb
  21. +2 −0 test/cookbooks/{minimal → test}/recipes/feature.rb
  22. +2 −0 test/cookbooks/{minimal → test}/recipes/font.rb
  23. +2 −0 test/cookbooks/{minimal → test}/recipes/http_acl.rb
  24. +2 −0 test/cookbooks/{minimal → test}/recipes/package.rb
  25. +2 −0 test/cookbooks/{minimal → test}/recipes/path.rb
  26. +2 −0 test/cookbooks/{minimal → test}/recipes/tasks.rb
  27. +1 −1 test/integration/certificate/pester/minimal.certificate.Tests.ps1
  28. +1 −1 test/integration/feature/pester/minimal.package.Tests.ps1
  29. +1 −1 test/integration/font/pester/minimal.font.Tests.ps1
  30. +1 −1 test/integration/http_acl/pester/minimal.http_acl.Tests.ps1
  31. +1 −1 test/integration/package/pester/minimal.package.Tests.ps1
  32. +1 −1 test/integration/path/pester/minimal.path.Tests.ps1
  33. +1 −1 test/integration/tasks/pester/minimal.tasks.Tests.ps1
@@ -19,30 +19,22 @@ verifier:
suites:
- name: tasks
run_list:
- recipe[windows::default]
- recipe[minimal::tasks]
- recipe[test::tasks]
- name: path
run_list:
- recipe[windows::default]
- recipe[minimal::path]
- recipe[test::path]
- name: certificate
run_list:
- recipe[windows::default]
- recipe[minimal::certificate]
- recipe[test::certificate]
- name: package
run_list:
- recipe[windows::default]
- recipe[minimal::package]
- recipe[test::package]
- name: feature
run_list:
- recipe[windows::default]
- recipe[minimal::feature]
- recipe[test::feature]
- name: http_acl
run_list:
- recipe[windows::default]
- recipe[minimal::http_acl]
- recipe[test::http_acl]
- name: font
run_list:
- recipe[windows::default]
- recipe[minimal::font]
- recipe[test::font]
@@ -1,5 +1,5 @@
---
driver:
driver:
name: azurerm
subscription_id: <%= ENV['AZURE_SUBSCRIPTION_ID'] %>
location: 'Central US'
@@ -20,24 +20,7 @@ platforms:
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
winrm set winrm/config/service/auth '@{Basic="true"}'
netsh advfirewall firewall set rule name="Windows Remote Management (HTTP-In)" profile=public protocol=tcp localport=5985 remoteip=localsubnet new remoteip=any
provisioner:
require_chef_omnibus: 11.18.6
- name: windows-2012-chef11.18.6
driver:
image_urn: MicrosoftWindowsServer:WindowsServer:2012-Datacenter:latest
provisioner:
require_chef_omnibus: 11.18.6
- name: windows-2012r2-chef11.18.6
driver:
image_urn: MicrosoftWindowsServer:WindowsServer:2012-R2-Datacenter:latest
provisioner:
require_chef_omnibus: 11.18.6
- name: windows-2016-tp-chef11.18.6
driver:
image_urn: MicrosoftWindowsServer:WindowsServer:Windows-Server-Technical-Preview:latest
provisioner:
require_chef_omnibus: 11.18.6
- name: windows-2008r2-chef12
- name: windows-2008r2
driver:
image_urn: MicrosoftWindowsServer:WindowsServer:2008-R2-SP1:latest
winrm_powershell_script: |-
@@ -47,12 +30,12 @@ platforms:
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
winrm set winrm/config/service/auth '@{Basic="true"}'
netsh advfirewall firewall set rule name="Windows Remote Management (HTTP-In)" profile=public protocol=tcp localport=5985 remoteip=localsubnet new remoteip=any
- name: windows-2012-chef12
- name: windows-2012
driver:
image_urn: MicrosoftWindowsServer:WindowsServer:2012-Datacenter:latest
- name: windows-2012r2-chef12
- name: windows-2012r2
driver:
image_urn: MicrosoftWindowsServer:WindowsServer:2012-R2-Datacenter:latest
- name: windows-2016-tp-chef12
- name: windows-2016-tp
driver:
image_urn: MicrosoftWindowsServer:WindowsServer:Windows-Server-Technical-Preview:latest
@@ -11,50 +11,32 @@ verifier:
name: pester
platforms:
- name: windows-2008r2-chef11.18.6
- name: windows-2008r2
driver_config:
box: chef/windows-server-2008r2-standard
provisioner:
require_chef_omnibus: 11.18.6
- name: windows-2008r2-chef12
driver_config:
box: chef/windows-server-2008r2-standard
- name: windows-2012r2-chef11.18.6
driver_config:
box: chef/windows-server-2012r2-standard
provisioner:
require_chef_omnibus: 11.18.6
- name: windows-2012r2-chef12
- name: windows-2012r2
driver_config:
box: chef/windows-server-2012r2-standard
suites:
- name: tasks
run_list:
- recipe[windows::default]
- recipe[minimal::tasks]
- recipe[test::tasks]
- name: path
run_list:
- recipe[windows::default]
- recipe[minimal::path]
- recipe[test::path]
- name: certificate
run_list:
- recipe[windows::default]
- recipe[minimal::certificate]
- recipe[test::certificate]
- name: package
run_list:
- recipe[windows::default]
- recipe[minimal::package]
- recipe[test::package]
- name: feature
run_list:
- recipe[windows::default]
- recipe[minimal::feature]
- recipe[test::feature]
- name: http_acl
run_list:
- recipe[windows::default]
- recipe[minimal::http_acl]
- recipe[test::http_acl]
- name: font
run_list:
- recipe[windows::default]
- recipe[minimal::font]
- recipe[test::font]
@@ -3,5 +3,5 @@ source 'https://supermarket.chef.io'
metadata
group :integration do
cookbook 'minimal', path: './test/cookbooks/minimal'
cookbook 'test', path: './test/cookbooks/test'
end

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,3 @@
name 'test'
version '0.0.1'
depends 'windows'
@@ -1,11 +1,13 @@
# We don't support reading the source from the cookbook yet. So manually point us to
# the correct place in the chef file cache.
windows_certificate "#{Chef::Config[:file_cache_path]}/cookbooks/minimal/files/default/der-cert1.cer" do
include_recipe 'windows::default'
windows_certificate "#{Chef::Config[:file_cache_path]}/cookbooks/test/files/default/der-cert1.cer" do
action :create
end
windows_certificate "#{Chef::Config[:file_cache_path]}/cookbooks/minimal/files/default/base64-cert2.cer" do
windows_certificate "#{Chef::Config[:file_cache_path]}/cookbooks/test/files/default/base64-cert2.cer" do
action :create
end
@@ -16,7 +18,7 @@
# Generate using:
# makecert -r -n "CN=ChefDummyCertForTest" -pe -ss My -sv test-cert.pvk test-cert.cer
# pvk2pfx -pvk test-cert.pvk -spc test-cert.cer -pfx test-cert.pfx -po chef123
windows_certificate "#{Chef::Config[:file_cache_path]}/cookbooks/minimal/files/default/test-cert.pfx" do
windows_certificate "#{Chef::Config[:file_cache_path]}/cookbooks/test/files/default/test-cert.pfx" do
action :create
pfx_password 'chef123'
store_name 'CA'
@@ -1,3 +1,5 @@
include_recipe 'windows::default'
node.default['windows']['feature_provider'] = 'dism'
windows_feature 'TelnetClient' do
@@ -1,3 +1,5 @@
include_recipe 'windows::default'
windows_font 'CodeNewRoman.otf'
cookbook_file 'C:/Asimov.otf' do
@@ -1,3 +1,5 @@
include_recipe 'windows::default'
user 'space user' do
password 'Pass@word1'
end
@@ -1,3 +1,5 @@
include_recipe 'windows::default'
windows_package 'Mercurial 3.6.1 (64-bit)' do
source 'https://www.mercurial-scm.org/release/windows/Mercurial-3.6.1-x64.exe'
action :install
@@ -1,3 +1,5 @@
include_recipe 'windows::default'
directory 'C:\path_test_path'
windows_path 'C:\path_test_path' do
@@ -1,3 +1,5 @@
include_recipe 'windows::default'
windows_task 'task_from_name' do
command 'dir'
end
@@ -1,6 +1,6 @@
$global:progressPreference = 'SilentlyContinue'
describe 'minimal::certificate' {
describe 'test::certificate' {
context 'windows_certificate' {
it "installs der-cert1" {
@@ -1,6 +1,6 @@
$global:progressPreference = 'SilentlyContinue'
describe 'minimal::feature' {
describe 'test::feature' {
context 'minimal_feature' {
it "feature TelnetClient was created" {
@@ -1,6 +1,6 @@
$global:progressPreference = 'SilentlyContinue'
describe 'minimal::font' {
describe 'test::font' {
context 'windows_font' {
it "installs CodeNewRoman" {
@@ -1,6 +1,6 @@
$global:progressPreference = 'SilentlyContinue'
describe 'minimal::http_acl' {
describe 'test::http_acl' {
context 'minimal_http_acl' {
it "http_acl added for some user to access google.com" {
@@ -1,6 +1,6 @@
$global:progressPreference = 'SilentlyContinue'
describe 'minimal::package' {
describe 'test::package' {
context 'minimal_package' {
it "task 'task_for_system' was created" {
@@ -1,6 +1,6 @@
$global:progressPreference = 'SilentlyContinue'
describe 'minimal::path' {
describe 'test::path' {
context 'windows_path' {
$SystemVariables = get-itemproperty 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment'
$UserVariables = get-itemproperty 'HKCU:\Environment'
@@ -1,6 +1,6 @@
$global:progressPreference = 'SilentlyContinue'
describe 'minimal::tasks' {
describe 'test::tasks' {
context 'windows_task' {
[xml]$top_level_task = schtasks /query /tn 'task_from_name' /XML 2> $null
[xml]$second_level_task_no_leading_slash = schtasks /query /tn '\chef\nested task' /XML 2> $null

0 comments on commit 2d4e072

Please sign in to comment.