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

FI-3395 Fix suite describe with routes #577

Merged
merged 8 commits into from
Dec 23, 2024

Conversation

Shaumik-Ashraf
Copy link
Contributor

Summary

Fix the bug where bundle exec inferno suite describe <suite id> command fails in test kits that mount custom routes. The bug was because the suites booter (i.e: Inferno::Application.start('suites')) needs lib/inferno.rb loaded, and the CLI wasn't loading it. The backdraw is that this kicks off loading the rest of Inferno, but I think the CLI is fast enough that this is negligible.

Testing Guidance

  1. Checkout this branch
  2. In a sibling directory, clone your favorite test kit that mounts routes, say smart-app-launch-test-kit.
  3. Modify the test kit's Gemfile to use the checked out inferno core:
gem 'inferno_core', path: '../inferno-core'
  1. bundle install
  2. Run bundle exec inferno suites and pick any suite id
  3. Run bundle exec inferno suite describe <suite id> and confirm it works

Copy link

codecov bot commented Dec 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.29%. Comparing base (2bb20b5) to head (21ca865).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #577   +/-   ##
=======================================
  Coverage   84.29%   84.29%           
=======================================
  Files         274      275    +1     
  Lines       11663    11668    +5     
  Branches     1302     1302           
=======================================
+ Hits         9831     9836    +5     
  Misses       1822     1822           
  Partials       10       10           
Flag Coverage Δ
backend 92.62% <100.00%> (+<0.01%) ⬆️
frontend 79.20% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@Jammjammjamm Jammjammjamm left a comment

Choose a reason for hiding this comment

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

Why don't move that definition out of lib/inferno.rb? It could be something like lib/inferno/route_storage.rb

module Inferno
  module RouteStorage
    def ...
    end
  end

  extend RouteStorage
end

@Shaumik-Ashraf Shaumik-Ashraf merged commit 0d17cd0 into main Dec 23, 2024
10 checks passed
@Shaumik-Ashraf Shaumik-Ashraf deleted the fi-3395-fix-suite-describe-with-routes branch December 23, 2024 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants