From dc8ca9f7eb18d209242a4e5a0a280f0424e2d257 Mon Sep 17 00:00:00 2001 From: dido18 Date: Wed, 10 Dec 2025 16:48:34 +0100 Subject: [PATCH] Update validator_test.go --- internal/orchestrator/app/validator_test.go | 25 +++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/internal/orchestrator/app/validator_test.go b/internal/orchestrator/app/validator_test.go index 13e3e9d3..f0b27477 100644 --- a/internal/orchestrator/app/validator_test.go +++ b/internal/orchestrator/app/validator_test.go @@ -33,6 +33,22 @@ func TestValidateAppDescriptorBricks(t *testing.T) { }, }, }, + { + ID: "arduino:brick-with-hidden-variable", + Name: "Hidden variable brick", + Variables: []bricksindex.BrickVariable{ + { + Name: "I_AM_HIDDEN", + Description: "I am an hidden variable", + Hidden: true, + }, + { + Name: "I_AM_HIDDEN_AND_REQUIRED", + Description: "I am an hidden and required variable", + DefaultValue: "", // Required (no default value) + }, + }, + }, }, } @@ -134,6 +150,15 @@ bricks: NOT_EXISTING_VARIABLE: "this-is-a-not-existing-variable-for-the-brick" ARDUINO_DEVICE_ID: "my-device-id" ARDUINO_SECRET: "my-secret" +`, + expectedError: nil, + }, + { + name: "hidden variables are not required to be set", + yamlContent: ` +name: App with +bricks: + - arduino:brick-with-hidden-variable: `, expectedError: nil, },