Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

FI-2041: Custom suites with no ids now throw standard error #387

Merged
merged 7 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ PLATFORMS
arm64-darwin-21
arm64-darwin-22
x86_64-darwin-20
x86_64-darwin-22
x86_64-linux

DEPENDENCIES
Expand Down
8 changes: 8 additions & 0 deletions lib/inferno/config/boot/suites.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,13 @@
end

ObjectSpace.each_object(TracePoint, &:disable)

Inferno::Entities::TestSuite.descendants.each do |descendant|
# When ID not assigned in custom test suites, Runnable.id will return default ID
# equal to the custom test suite's parent class name
if descendant.id.blank? || descendant.id == 'Inferno::Entities::TestSuite'
raise StandardError, "Error initializing test suite #{descendant.name}: test suite ID is not set"
end
end
end
end