-
Notifications
You must be signed in to change notification settings - Fork 104
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
Conversation
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! |
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.
Thanks @raphink . Given that the epp validator is so similiar to the puppet-syntax validator, could you also create the unit tests as well?
Just added some unit tests. I was wondering about the Puppet version contexts, but it does actually impact the EPP validation output as well. |
The tests are passing now. Do you want me to add something still @glennsarti ? |
@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)) |
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.
Note for me, not to stop merging: Need to investigate why using a fixed Linux path. This shouldn't work on Windows?
@rodjek Apart from removing one test I'm happy to merge this. Do you want to review prior? |
Done removing the extra test @scotje |
All concerns have been addressed. Merging. Thanks again @raphink !! |
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.