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

(PDK-421) Validate EPP syntax #680

Merged
merged 5 commits into from
Jul 12, 2019
Merged

(PDK-421) Validate EPP syntax #680

merged 5 commits into from
Jul 12, 2019

Conversation

raphink
Copy link
Contributor

@raphink raphink commented Jun 12, 2019

This is a base implementation for validating EPP templates. I essentially copy/pasted the Puppet validate one, so it probably needs some pruning, but it works.

@coveralls
Copy link

coveralls commented Jun 12, 2019

Coverage Status

Coverage increased (+0.1%) to 93.201% when pulling b611171 on raphink:validate_epp into 8177b43 on puppetlabs:master.

@scotje
Copy link
Contributor

scotje commented Jun 14, 2019

Hi @raphink! Thanks for the contribution! We'll get someone to take a look at this as soon as we can, in the meantime the test failures look like they should be pretty easy to address and the coveralls failure is just asking for this new code to have some unit test coverage.

We can look at addressing that ourselves but if you wanted to work on fixing up those failures it would help us get this reviewed and merged more quickly. :)

Thanks again!

@scotje scotje requested review from rodjek and glennsarti June 14, 2019 22:10
@scotje scotje added feature Needs Tests needs-triage Newly created issue that has not been reviewed by a PDK contributor labels Jun 14, 2019
Copy link
Contributor

@glennsarti glennsarti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @raphink . Given that the epp validator is so similiar to the puppet-syntax validator, could you also create the unit tests as well?

e.g. https://github.com/puppetlabs/pdk/blob/master/spec/unit/pdk/validate/puppet/puppet_syntax_spec.rb

spec/acceptance/validate_puppet_spec.rb Show resolved Hide resolved
@raphink
Copy link
Contributor Author

raphink commented Jun 19, 2019

Just added some unit tests. I was wondering about the Puppet version contexts, but it does actually impact the EPP validation output as well.

@raphink
Copy link
Contributor Author

raphink commented Jun 21, 2019

The tests are passing now. Do you want me to add something still @glennsarti ?

@glennsarti
Copy link
Contributor

@raphink Sorry for the delayed response. We're just in the middle of a PDK release, but I promise I'll get back to you soon.

let(:options) { { auto_correct: true } }

it 'has no effect' do
expect(command_args).to eq(%w[epp validate --config /dev/null --modulepath].push(tmpdir).concat(targets))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for me, not to stop merging: Need to investigate why using a fixed Linux path. This shouldn't work on Windows?

@glennsarti
Copy link
Contributor

@rodjek Apart from removing one test I'm happy to merge this. Do you want to review prior?

@scotje scotje removed Needs Tests needs-triage Newly created issue that has not been reviewed by a PDK contributor labels Jul 2, 2019
@raphink
Copy link
Contributor Author

raphink commented Jul 5, 2019

Done removing the extra test @scotje

@glennsarti
Copy link
Contributor

All concerns have been addressed. Merging. Thanks again @raphink !!

@glennsarti glennsarti merged commit ea789ac into puppetlabs:master Jul 12, 2019
@rodjek rodjek changed the title [PDK-421] Validate EPP syntax (WIP) (PDK-421) Validate EPP syntax Jul 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants