Skip to content

Commit

Permalink
check id length
Browse files Browse the repository at this point in the history
  • Loading branch information
Jammjammjamm committed Oct 23, 2024
1 parent 11bca21 commit 8664285
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/inferno/dsl/runnable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,11 @@ def id(new_id = nil)

@base_id = new_id || @base_id || default_id

@id = "#{prefix}#{@base_id}"
final_id = "#{prefix}#{@base_id}"

raise StandardError, "ID '#{final_id}' exceeds the maximum id length of 255 characters" if final_id.length > 255

@id = final_id
end

# Set/Get a runnable's title
Expand Down

0 comments on commit 8664285

Please sign in to comment.