From 67dea6b5bd1c73c938a53276b7337e8d86b31272 Mon Sep 17 00:00:00 2001 From: kanchan-dhamane <74534570+kanchan-dhamane@users.noreply.github.com> Date: Sat, 6 Jul 2024 10:10:10 +0530 Subject: [PATCH] chore: updates the TestExtractParameter and TestConvertNullable test cases- 6533 Signed-off-by: kanchan-dhamane <74534570+kanchan-dhamane@users.noreply.github.com> --- references/cuegen/testdata/nullable.cue | 2 +- references/docgen/parser_test.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/references/cuegen/testdata/nullable.cue b/references/cuegen/testdata/nullable.cue index 162fa7c5b15..ef662668ed4 100644 --- a/references/cuegen/testdata/nullable.cue +++ b/references/cuegen/testdata/nullable.cue @@ -4,7 +4,7 @@ Nullable: { field1?: null | string field2?: null | int field3?: null | bool - Field4: null | { + Field4: null | { field1: null | string field2: null | int field3: null | bool diff --git a/references/docgen/parser_test.go b/references/docgen/parser_test.go index e516788f458..b8f2e52da89 100644 --- a/references/docgen/parser_test.go +++ b/references/docgen/parser_test.go @@ -639,7 +639,7 @@ func TestExtractParameter(t *testing.T) { Name | Description | Type | Required | Default ---- | ----------- | ---- | -------- | ------- - orValue | | [KeyConfig](#keyconfig) or [KeySecret](#keysecret) | true | + orValue | | struct | true | #### KeyConfig @@ -721,7 +721,7 @@ func TestExtractParameter(t *testing.T) { cueValue, _ := common.GetCUEParameterValue(ca.cueTemplate, nil) out, _, err := ref.parseParameters("", cueValue, key, 0, false) assert.NoError(t, err, key) - assert.Contains(t, out, ca.contains, key) + assert.Contains(t, out, ca.contains) } } @@ -764,7 +764,7 @@ func TestExtractParameterFromFiles(t *testing.T) { containerName | Specify the name of the target container, if not set, use the component name. | string | false | empty replace | Specify if replacing the whole environment settings for the container. | bool | false | false env | Specify the environment variables to merge, if key already existing, override its value. | map[string]string | true | - unset | Specify which existing environment variables to unset. | []string | true |`, + unset | Specify which existing environment variables to unset. | []string | true | `, }, "command": { path: "testdata/parameter/command.cue", @@ -801,7 +801,7 @@ func TestExtractParameterFromFiles(t *testing.T) { command | Specify the command to use in the target container, if not set, it will not be changed. | null | true | args | Specify the args to use in the target container, if set, it will override existing args. | null | true | addArgs | Specify the args to add in the target container, existing args will be kept, cannot be used with args. | null | true | - delArgs | Specify the existing args to delete in the target container, cannot be used with args. | null | true |`, + delArgs | Specify the existing args to delete in the target container, cannot be used with args. | null | true | `, }, "condition": { path: "testdata/parameter/condition.cue",