-
Notifications
You must be signed in to change notification settings - Fork 5
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
FI-2937 inferno execute #517
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #517 +/- ##
==========================================
+ Coverage 79.86% 79.99% +0.12%
==========================================
Files 253 257 +4
Lines 13352 13403 +51
Branches 1290 1290
==========================================
+ Hits 10664 10722 +58
+ Misses 1939 1932 -7
Partials 749 749
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Updated Testing Guidance
|
# | ||
# @abstract | ||
# rubocop:disable Lint/UnusedMethodArgument | ||
class AbstractOutputter |
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.
I don't think we should add abstract classes. If you think we need some sort of really basic output class, make this some sort of null output class that works but doesn't print anything.
lib/inferno/apps/cli/execute.rb
Outdated
@tests ||= options[:tests]&.map { |short_id| find_by_short_id!(tests_repo, short_id) } | ||
end | ||
|
||
def find_by_short_id!(repo, short_id) |
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.
Don't make a bang method if there isn't a version without a bang.
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.
This dosen't seem right:
ᐅ bundle exec inferno execute -s dev_validator -i "url:https://hapi.fhir.org/baseR4" patient_id:1234321 --tests 1.01 1.02
================================================================================
Testing dev_validator
================================================================================
Running tests. This may take a while...
================================================================================
Test Results:
================================================================================
1.01 Patient Read Test: ✓ pass
Validator Suite: ✓ pass
1 Patient Test Group: ✓ pass
1.02 Patient Validate Test: ✓ pass
================================================================================
If short ids are provided, I wouldn't expect the suite to run.
Also, users shouldn't have to use a different command line argument depending on whether the short ids belong to tests or groups. There should be a single argument for short ids which can take both.
The implementation is literally using |
Gotcha, that is necessary behavior for the UI, but is confusing here, so can you make a ticket for that? If you want to get this in and unify the short id input in a follow-up ticket, that is fine with me, I'd just want it to be the next one you pick up. |
Summary
Putting up an early PR for feedback. This implements a very basic
bundle exec inferno execute
command that will run an entire test suite synchronously and output color-coded test results, messages, and requests. Note:Inferno::Application['async_jobs]
properly when booting inferno from CLI, so I ended up adding aforce_synchronous
kwarg toJobs
Pastel
gem instead ofThor
orcolorize
, Pastel is made from the same person astty-markdown
TODOsTesting GuidanceOUTDATED SEE BELOW FOR NEW TESTING GUIDANCEbundle exec rspec
bundle exec inferno services start
Updated testing guidance 8/9/2024. Ready for review.Updated again 8/28/2024. Ready for review.