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

fix syntax error in trusted_ca::java exec resource #75

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ashleygould
Copy link

@ashleygould ashleygould commented Jan 15, 2025

Pull Request (PR) description

Fix syntax error in trusted_ca::java exec resource by changing the value of require attribute to $filename.

This Pull Request (PR) fixes the following issues

Fixes #74

@ekohl ekohl linked an issue Jan 15, 2025 that may be closed by this pull request
@ashleygould ashleygould changed the title fix syntax error in trusted_ca::java exec resource #76 fix syntax error in trusted_ca::java exec resource Jan 15, 2025
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.

This isn't a syntax error, but rather a logic error. It only shows up if a non-default value is passed in for $filename, so it's a bug I introduced in 96843d5.

Would you mind fixing up the commit description and adding a test to spec/defines/trusted_ca_java_spec.rb that would have caught it in the first place?

        context 'with filename' do
          let(:local_params) { { filename: '/path/to/file' } } 

          it { is_expected.to compile.with_all_deps } 
          it { is_expected.to contain_exec('import /path/to/file to jks /etc/alternatives/jre_1.7.0/lib/security/cacerts').that_requires('/path/to/file') } 
        end

@ekohl ekohl added the bug Something isn't working label Jan 15, 2025
@ashleygould
Copy link
Author

ugg. Ill never add issue numbers to commit messages again. sorry about that. and I'll never name branches after issues again either. what a mess. If you like to keep the pr history clean we can drop and recreate this. but I cant really undo the first commit message and topic branch name within this current PR.

@ekohl
Copy link
Member

ekohl commented Jan 16, 2025

ugg. Ill never add issue numbers to commit messages again. sorry about that. and I'll never name branches after issues again either. what a mess. If you like to keep the pr history clean we can drop and recreate this. but I cant really undo the first commit message and topic branch name within this current PR.

Referencing those is not a problem. I only wanted to provide some additional historical context.

You can change commit messages by amending commits (git commit --amend). More advanced is using git rebase to rewrite history (like squash commits together), but technically that's not required.

I'm fine if you focus on getting the test suite to pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Misnamed require target in trusted_ca::java exec resource
2 participants