-
Notifications
You must be signed in to change notification settings - Fork 243
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
Add test-case for validating devfiles on component create #3908
Add test-case for validating devfiles on component create #3908
Conversation
Signed-off-by: John Collier <jcollier@redhat.com>
Signed-off-by: John Collier <jcollier@redhat.com>
Signed-off-by: John Collier <jcollier@redhat.com>
Signed-off-by: John Collier <jcollier@redhat.com>
…eate Signed-off-by: John Collier <jcollier@redhat.com>
Rebased the PR. Since #3867 included the fix also in this PR, this PR has been updated to just include the test case for the scenario |
Codecov Report
@@ Coverage Diff @@
## master #3908 +/- ##
==========================================
+ Coverage 44.60% 44.77% +0.17%
==========================================
Files 143 143
Lines 13860 13923 +63
==========================================
+ Hits 6182 6234 +52
- Misses 7089 7097 +8
- Partials 589 592 +3
Continue to review full report at Codecov.
|
@mik-dass @prietyc123 Can I get a review on this? Thanks! |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: girishramnani The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Please review the full test history for this PR and help us cut down flakes. |
What type of PR is this?
/kind bug
What does does this PR do / why we need it:
Currently, a user can pass in any file toodo create
, and it will always succeed provided the file exists, either on disk or as part of a registry, nothing tells them if their devfile is valid or not. No validation is performed until the user tries to push the component.This PR updates theodo create
functionality to properly validate devfiles when a component is created. If an invalid devfile is specified, a validation error will be thrown. I've also left the validation in forodo push
, as we should still be validating on each push as well.Adds an integration test case to validate that
odo create
validates the devfileWhich issue(s) this PR fixes:
Fixes #3778
PR acceptance criteria:
Unit test
Integration test
Documentation
I have read the test guidelines
How to test changes / Special notes to the reviewer:
Run the
odo create
integration tests