-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restructured Integration Testing Suite using InSpec Profile #78
Conversation
- A few minor changes to test recipes - Addition of full integration test suite using InSpec profile structure
.kitchen.yml
Outdated
@@ -4,79 +4,72 @@ driver: | |||
provider: parallels | |||
|
|||
provisioner: | |||
product_name: chef | |||
product_version: 13.8 | |||
name: chef_zero |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should still be forcing the latest chef-client here, instead of what might be in a testing box.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
provisioner:
product_name: chef
product_version: latest
install_strategy: always
.kitchen.yml
Outdated
- recipe[macos_test::spotlight] | ||
verifier: | ||
controls: | ||
- indexing/searching |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These slashes make me thing there's some sort of namespacing happening at first glance - may just indexing_and_seaching
?
.kitchen.yml
Outdated
- recipe[macos_test::xcode] | ||
verifier: | ||
controls: | ||
- xcode/simulators |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These slashes make me thing there's some sort of namespacing happening at first glance - may just xcode_and_simulators
?
test/integration/default/README.md
Outdated
# macOS Cookbook InSpec Profile | ||
|
||
The macOS Cookbook InSpec profile tests the custom resources and the recipes | ||
that utilize them to assertain their full functionality and dependability. We |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*ascertain
@@ -0,0 +1,35 @@ | |||
title 'desktop & screen saver' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer and
over &
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
describe command('systemsetup -getremoteappleevents') do | ||
apple_events_pattern = Regexp.union('Remote Apple Events: On') | ||
its('stdout') { should match apple_events_pattern } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use the include
matcher to write this more simply.
its('stdout') { should include 'Remote Apple Events: On' }
end | ||
|
||
describe command('/opt/chef/embedded/bin/xcversion simulators') do | ||
sim_pattern = Regexp.union 'iOS 10.3.1 Simulator (installed)' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using the include
matcher here as well.
end | ||
|
||
describe command('/opt/chef/embedded/bin/xcversion simulators') do | ||
sim_pattern = Regexp.union 'iOS 9.3 Simulator (installed)' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here.
This PR
chef generate cookbook
smoke test layout into an InSpec profile layout, created byinspec init profile
.admin-user
vs.standard-user
controls)Why
Takeaways