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 22, 2024
1 parent 25ca10a commit d542c9c
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 d542c9c

Please sign in to comment.