-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
modulesync 5.2.0 #128
modulesync 5.2.0 #128
Conversation
5847ce4
to
1946415
Compare
Rakefile: | ||
changelog_version_tag_pattern: '%s' |
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.
This may be something we do want to consider keeping. Rather than prefixing with v
everywhere.
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've never really seen the point of the v
prefix, which is why we went with bare tags in our projects.
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 agree with that. However, I prefer consistency more so I won't argue for changing it in a project. In some new projects I also started without a v
prefix.
spec/defines/openssl_dhparam_spec.rb
Outdated
expect do | ||
is_expected.to contain_file('/etc/ssl/dhparam.pem') | ||
}.to raise_error(%r{got ['barz'|String]}) | ||
end.to raise_error(%r{got ['barz'|String]}) |
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.
Not sure why I can't make a suggestion, but this is the native way to test for this:
is_expected.to compile.and_raise_error(%r{got ['barz'|String]})
This repeats all over this file
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.
The current syntax is probably a remnant from old rspec/rspec-puppet syntax
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.
Very likely. Technically it kind of works, but if we're making changes now we might as well go for the correct way :)
6205a60
to
f4fa7eb
Compare
Ci passes now. I had to disable a bunch of rubocop cops and drop puppet 7. the tests currently don't pass on puppet 7. I would like to get this merged and afterwards have a look at puppet 7 again. the diff is already quite huge. |
Fixes tests due to #130.
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.
What were the errors with Puppet 7?
expect do | ||
is_expected.to contain_file('/etc/ssl/certs/foo.cnf') | ||
}.to raise_error(%r{got ['barz'|String]}) | ||
end.to raise_error(%r{got ['barz|Sting]}) |
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.
This (and others in this file) should really be changed to:
is_expected.to compile.and_raise_error(%r{got ['barz|Sting]})
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.
should we remove the contain_file
test or do you want me to keep them?
diff --git a/spec/defines/openssl_export_pem_cert_spec.rb b/spec/defines/openssl_export_pem_cert_spec.rb
index a296c7f..5bb4b30 100644
--- a/spec/defines/openssl_export_pem_cert_spec.rb
+++ b/spec/defines/openssl_export_pem_cert_spec.rb
@@ -17,11 +17,7 @@ describe 'openssl::export::pem_cert' do
}
end
- it 'fails' do
- expect do
- is_expected.to contain_exec('Export /etc/ssl/certs/foo.pfx to /etc/ssl/certs/foo.pem')
- end.to raise_error(Puppet::Error, %r{either})
- end
+ it { is_expected.to compile.and_raise_error(%r{either}) }
end
context 'when enable and pfx and der cert is provided' 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.
I can take a look at changing those, but would prefer to do it after this PR got merged
modulesync 4.1.0