-
Notifications
You must be signed in to change notification settings - Fork 68
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
(MODULES-6746) Convert Tests to RSpec #98
(MODULES-6746) Convert Tests to RSpec #98
Conversation
Gemfile
Outdated
| @@ -63,6 +63,7 @@ group :system_tests do | |||
| gem "beaker-abs", *location_for(ENV['BEAKER_ABS_VERSION'] || '~> 0.1') | |||
| gem "puppet-blacksmith", '~> 3.4', :require => false | |||
| gem "beaker-windows", '~> 0.6', :require => false | |||
| gem "beaker-testmode_switcher", :require => false | |||
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.
out of scope for this ticket
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.
Snip
|
|
||
| context 'MODULES-3035 - Add New Config Item' do | ||
|
|
||
| before(:all) do |
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.
Have you tried a "before(:each)" to avoid duplication of the before and after calls?
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 did. The problem is that each of the it_behaves_like blocks typically has two examples in it. One to apply the manifest, and the second to verify that the test property was applied correctly. If I do these as before and after each blocks, then my config file gets reset between each of those examples, and the second test will fail each time.
| # require 'beaker-windows' | ||
| # test_name 'MODULES-3037 - C97738 Install known good package with utf-8 via manifest and remove via manifest' | ||
| # confine(:to, :platform => 'windows') | ||
| # | ||
| # # arrange | ||
| # package_name = '竹ChocolateyGUIÖ' | ||
| # package_name = '???ChocolateyGUI??' |
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.
we're not testing UTF-8 characters anymore?
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 guess not? The whole test is commented out in the master I'm working from, but it looks like me moving it around has wiped out the UTF-8 characters.
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.
Ok. I got the UTF-8 characters restored into the file. I'll take a pass at getting these test to run, but if I run into any issues, since they are commented out in the module right now, I'll take the cop out and start another ticket to get these working.
6b7ae09
to
c2ed145
Compare
c2ed145
to
6ddc592
Compare
| @@ -0,0 +1,170 @@ | |||
| require 'spec_helper_acceptance' | |||
|
|
|||
| confine(:to, :platform => 'windows') | |||
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 don't need both this confine and "windows_agents" as the latter is functionally equivalent.
| end | ||
| end | ||
| end | ||
| end |
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.
add newlines at EOF
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.
See comments
61c8532
to
b38dad9
Compare
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.
Nit: more EOL additions
| install_module_dependencies_on(agent) | ||
| install_module_on(agent) | ||
| install_chocolatey | ||
| end |
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.
Add EOL
| end | ||
| end | ||
| end | ||
| end |
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.
Add EOL
| end | ||
| end | ||
| end | ||
| end |
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.
Add EOL
| end | ||
| end | ||
| end | ||
| end |
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.
Add EOL
| end | ||
| end | ||
| end | ||
| end |
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.
Add EOL
b150f0c
to
259a1b1
Compare
This change converts the module tests to the more standardized RSpec tests. Add back utf-8 test file.
259a1b1
to
c9efdd4
Compare
This change converts the module tests to the more standardized RSpec tests.