Skip to content
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

Merged
merged 15 commits into from
Mar 8, 2022
Merged

modulesync 5.2.0 #128

merged 15 commits into from
Mar 8, 2022

Conversation

bastelfreak
Copy link
Member

modulesync 4.1.0

@bastelfreak bastelfreak force-pushed the modulesync branch 2 times, most recently from 5847ce4 to 1946415 Compare June 14, 2021 08:51
Comment on lines -19 to -20
Rakefile:
changelog_version_tag_pattern: '%s'
Copy link
Member

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.

Copy link
Member

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.

Copy link
Member

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.

Comment on lines 14 to 16
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]})
Copy link
Member

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

Copy link
Member

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

Copy link
Member

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 :)

spec/spec_helper_local.rb Outdated Show resolved Hide resolved
spec/spec_helper_local.rb Outdated Show resolved Hide resolved
@kenyon kenyon closed this Aug 24, 2021
@kenyon kenyon reopened this Aug 24, 2021
@kenyon kenyon changed the title modulesync 4.1.0 modulesync 5.1.0 Dec 16, 2021
@bastelfreak bastelfreak force-pushed the modulesync branch 3 times, most recently from 6205a60 to f4fa7eb Compare March 7, 2022 15:57
@bastelfreak bastelfreak changed the title modulesync 5.1.0 modulesync 5.2.0 Mar 7, 2022
@bastelfreak
Copy link
Member Author

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.

Copy link
Member

@ekohl ekohl left a 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?

Comment on lines +19 to +21
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]})
Copy link
Member

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]})

Copy link
Member Author

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

Copy link
Member Author

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

spec/unit/puppet/provider/dhparam/openssl_spec.rb Outdated Show resolved Hide resolved
@bastelfreak bastelfreak merged commit 1193825 into master Mar 8, 2022
@bastelfreak bastelfreak deleted the modulesync branch March 8, 2022 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants