From d542c9c3274772e7d627895da6844be9a5a5658a Mon Sep 17 00:00:00 2001 From: Stephen MacVicar Date: Tue, 22 Oct 2024 13:44:17 -0400 Subject: [PATCH] check id length --- lib/inferno/dsl/runnable.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/inferno/dsl/runnable.rb b/lib/inferno/dsl/runnable.rb index c3053bcc84..374b72acce 100644 --- a/lib/inferno/dsl/runnable.rb +++ b/lib/inferno/dsl/runnable.rb @@ -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