Skip to content

Commit a88338c

Browse files
committed
[test] Updated results for v0.6.3
Signed-off-by: Nick Volynkin <[email protected]>
1 parent 84c82b4 commit a88338c

File tree

19 files changed

+340
-80
lines changed

19 files changed

+340
-80
lines changed

test/basic-types/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include ../test.mk
1+
include ../test.mk

test/basic-types/README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,34 +9,37 @@ Test cases for basic types:
99
All types are checked in required and nullable variations.
1010

1111
## Parameters
12-
1312
### Integer parameters
1413

1514
| Name | Description | Type | Value |
1615
| ------------------------ | --------------------------------------------- | ------ | ------ |
17-
| `testInt` | Integer variable | `int` | `null` |
16+
| `testInt` | Integer variable | `int` | `0` |
1817
| `testIntDefault` | Integer variable with default value | `int` | `10` |
1918
| `testIntNullable` | Integer variable, nullable | `*int` | `null` |
2019
| `testIntDefaultNullable` | Integer variable with default value, nullable | `*int` | `10` |
2120

21+
2222
### Boolean parameters
2323

2424
| Name | Description | Type | Value |
2525
| ----------------------- | --------------------------------------------- | ------- | ------- |
26-
| `testBool` | Boolean variable | `bool` | `null` |
26+
| `testBool` | Boolean variable | `bool` | `false` |
2727
| `testBoolFalse` | Boolean variable, defaults to false | `bool` | `false` |
2828
| `testBoolTrue` | Boolean variable, defaults to true | `bool` | `true` |
2929
| `testBoolNullable` | Boolean variable, nullable | `*bool` | `null` |
3030
| `testBoolFalseNullable` | Boolean variable, defaults to false, nullable | `*bool` | `false` |
3131
| `testBoolTrueNullable` | Boolean variable, defaults to true, nullable | `*bool` | `true` |
3232

33+
3334
### String parameters
3435

3536
| Name | Description | Type | Value |
3637
| --------------------------- | -------------------------------------------- | --------- | -------------- |
37-
| `testString` | String variable | `string` | `null` |
38-
| `testStringEmpty` | String variable, empty by default | `string` | `` |
38+
| `testString` | String variable | `string` | `""` |
39+
| `testStringEmpty` | String variable, empty by default | `string` | `""` |
3940
| `testStringDefault` | String variable with default value | `string` | `string value` |
4041
| `testStringNullable` | String variable, nullable | `*string` | `null` |
41-
| `testStringEmptyNullable` | String variable, empty by default, nullable | `*string` | `` |
42+
| `testStringEmptyNullable` | String variable, empty by default, nullable | `*string` | `""` |
4243
| `testStringDefaultNullable` | String variable with default value, nullable | `*string` | `string value` |
44+
45+

test/complex-types/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include ../test.mk
1+
include ../test.mk

test/complex-types/README.md

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,37 @@ Tests for complex types, extending base ones.
55
- `quantity` — measure of CPU cores and memory.
66

77
## Parameters
8-
98
### Quantity parameters
109

11-
| Name | Description | Type | Value |
12-
| ------------------------- | --------------------------------------------------------------- | ---------- | -------- |
13-
| `quantityRequired` | A required quantity value (CPU cores or RAM). | `quantity` | `null` |
14-
| `quantityRequiredEmpty` | A required quantity value with empty string (CPU cores or RAM). | `quantity` | `` |
15-
| `quantityDefaultInt` | A quantity default with a bare integer. | `quantity` | `2` |
16-
| `quantityDefaultStrInt` | A quantity default with a quoted integer. | `quantity` | `2` |
17-
| `quantityDefaultCpuShare` | A quantity default with vCPU share. | `quantity` | `100m` |
18-
| `quantityDefaultRam` | A quantity default with RAM size. | `quantity` | `500MiB` |
10+
| Name | Description | Type | Value |
11+
| ------------------------- | --------------------------------------------------------------- | -------- | -------- |
12+
| `quantityRequired` | A required quantity value (CPU cores or RAM). | `string` | `""` |
13+
| `quantityRequiredEmpty` | A required quantity value with empty string (CPU cores or RAM). | `string` | `""` |
14+
| `quantityDefaultInt` | A quantity default with a bare integer. | `string` | `2` |
15+
| `quantityDefaultStrInt` | A quantity default with a quoted integer. | `string` | `2` |
16+
| `quantityDefaultCpuShare` | A quantity default with vCPU share. | `string` | `100m` |
17+
| `quantityDefaultRam` | A quantity default with RAM size. | `string` | `500MiB` |
18+
1919

2020
### Nullable quantity parameters
2121

22-
| Name | Description | Type | Value |
23-
| --------------------------------- | --------------------------------------------------------------- | ----------- | -------- |
24-
| `quantityNullable` | A nullable quantity value. | `*quantity` | `null` |
25-
| `quantityNullableRequiredEmpty` | A nullable quantity value with empty string (CPU cores or RAM). | `*quantity` | `` |
26-
| `quantityNullableDefaultInt` | A nullable quantity with a default bare integer. | `*quantity` | `2` |
27-
| `quantityNullableDefaultStrInt` | A nullable quantity with a default quoted integer. | `*quantity` | `2` |
28-
| `quantityNullableDefaultCpuShare` | A nullable quantity with a default CPU share. | `*quantity` | `100m` |
29-
| `quantityNullableDefaultRam` | A nullable quantity with a default RAM size. | `*quantity` | `500MiB` |
22+
| Name | Description | Type | Value |
23+
| --------------------------------- | --------------------------------------------------------------- | --------- | -------- |
24+
| `quantityNullable` | A nullable quantity value. | `*string` | `null` |
25+
| `quantityNullableRequiredEmpty` | A nullable quantity value with empty string (CPU cores or RAM). | `*string` | `""` |
26+
| `quantityNullableDefaultInt` | A nullable quantity with a default bare integer. | `*string` | `2` |
27+
| `quantityNullableDefaultStrInt` | A nullable quantity with a default quoted integer. | `*string` | `2` |
28+
| `quantityNullableDefaultCpuShare` | A nullable quantity with a default CPU share. | `*string` | `100m` |
29+
| `quantityNullableDefaultRam` | A nullable quantity with a default RAM size. | `*string` | `500MiB` |
30+
31+
32+
### Enumerated parameters
33+
34+
| Name | Description | Type | Value |
35+
| ---------------------------------- | ------------------------------------ | -------- | ------- |
36+
| `enumWithDefault` | Enum variable, defaults to "micro" | `string` | `{}` |
37+
| `enumWithoutDefault` | Enum variable with no default value. | `string` | `{}` |
38+
| `nested` | Element with nested enum fields | `object` | `{}` |
39+
| `nested.enumWithCustomTypeDefault` | Enum variable, defaults to "micro" | `string` | `micro` |
40+
41+

test/complex-types/values.schema.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,40 @@
22
"title": "Chart Values",
33
"type": "object",
44
"properties": {
5+
"enumWithDefault": {
6+
"description": "Enum variable, defaults to \"micro\"",
7+
"type": "string",
8+
"default": "micro",
9+
"enum": [
10+
"nano",
11+
"micro",
12+
"small",
13+
"medium",
14+
"large",
15+
"xlarge",
16+
"2xlarge"
17+
]
18+
},
19+
"enumWithoutDefault": {
20+
"description": "Enum variable with no default value.",
21+
"type": "string",
22+
"enum": [
23+
"nano",
24+
"micro",
25+
"small",
26+
"medium",
27+
"large",
28+
"xlarge",
29+
"2xlarge"
30+
]
31+
},
32+
"nested": {
33+
"description": "Element with nested enum fields",
34+
"type": "object",
35+
"default": {
36+
"enumWithCustomTypeDefault": "micro"
37+
}
38+
},
539
"quantityDefaultCpuShare": {
640
"description": "A quantity default with vCPU share.",
741
"type": "string",

test/complex-types/values.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,20 @@ quantityNullableDefaultCpuShare: "100m"
3939
## @param quantityNullableDefaultRam {*quantity} A nullable quantity with a default RAM size.
4040
quantityNullableDefaultRam: "500MiB"
4141

42+
43+
## @section Enumerated parameters
44+
45+
## @param enumWithDefault {string enum:"nano,micro,small,medium,large,xlarge,2xlarge"} Enum variable, defaults to "micro"
46+
enumWithDefault: "micro"
47+
48+
## @param enumWithoutDefault {string enum:"nano,micro,small,medium,large,xlarge,2xlarge"} Enum variable with no default value.
49+
enumWithoutDefault:
50+
51+
52+
## @param nested {nested} Element with nested enum fields
53+
nested:
54+
## @param nested.enumWithDefault {string enum:"nano,micro,small,medium,large,xlarge,2xlarge"} Enum variable, defaults to "micro"
55+
enumWithDefault: "micro"
56+
57+
## @param nested.enumWithoutDefault {string enum:"nano,micro,small,medium,large,xlarge,2xlarge"} Enum variable with no default value.
58+
enumWithoutDefault:

test/fields/Makefile

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/fields/README.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

test/lists/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include ../test.mk
1+
include ../test.mk

test/lists/README.md

Lines changed: 43 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,51 @@
33
Cases for lists of `int`, `string`, and `object`.
44

55
## Parameters
6-
76
### Integer lists
87

9-
| Name | Description | Type | Value |
10-
| ------------------------- | ------------------------------------------------- | -------- | ------ |
11-
| `intList` | A required list of integers, empty. | `[]int` | `null` |
12-
| `intListSingle` | A list of integers with one value. | `[]int` | `null` |
13-
| `intListMultiple` | A list of integers with one value. | `[]int` | `null` |
14-
| `intListNullable` | A nullable list of integers, empty. | `[]*int` | `null` |
15-
| `intListNullableSingle` | A nullable list of integers with one value. | `[]*int` | `null` |
16-
| `intListNullableMultiple` | A nullable list of integers with multiple values. | `[]*int` | `null` |
8+
| Name | Description | Type | Value |
9+
| ------------------------- | ------------------------------------------------- | -------- | ------------ |
10+
| `intList` | A required list of integers, empty. | `[]int` | `[]` |
11+
| `intListSingle` | A list of integers with one value. | `[]int` | `[80]` |
12+
| `intListMultiple` | A list of integers with multiple values. | `[]int` | `[80, 8080]` |
13+
| `intListNullable` | A nullable list of integers, empty. | `[]*int` | `[]` |
14+
| `intListNullableSingle` | A nullable list of integers with one value. | `[]*int` | `[80]` |
15+
| `intListNullableMultiple` | A nullable list of integers with multiple values. | `[]*int` | `[80, 8080]` |
16+
1717

1818
### String lists
1919

20-
| Name | Description | Type | Value |
21-
| ---------------------------- | ------------------------------------------------ | ----------- | ------ |
22-
| `stringList` | A required list of strings, empty. | `[]string` | `null` |
23-
| `stringListSingle` | A required list of strings with one value. | `[]string` | `null` |
24-
| `stringListMultiple` | A required list of strings with multiple values. | `[]string` | `null` |
25-
| `stringListNullable` | A nullable list of strings, empty. | `[]*string` | `null` |
26-
| `stringListNullableSingle` | A nullable list of strings with one value. | `[]*string` | `null` |
27-
| `stringListNullableMultiple` | A nullable list of strings with multiple values. | `[]*string` | `null` |
20+
| Name | Description | Type | Value |
21+
| ----------------------------- | ------------------------------------------------ | ----------- | ---------------- |
22+
| `stringList` | A required list of strings, empty. | `[]string` | `[]` |
23+
| `stringListSingle` | A required list of strings with one value. | `[]string` | `[user1]` |
24+
| `stringListMultiple` | A required list of strings with multiple values. | `[]string` | `[user1, user2]` |
25+
| `stringListNullable` | A nullable list of strings, empty. | `*[]string` | `null` |
26+
| `stringListNullableSingle` | A nullable list of strings with one value. | `*[]string` | `[user1]` |
27+
| `stringListNullableMultiple` | A nullable list of strings with multiple values. | `*[]string` | `[user1, user2]` |
28+
| `stringListNullable2` | A nullable list of strings, empty. | `[]*string` | `[]` |
29+
| `stringListNullableSingle2` | A nullable list of strings with one value. | `[]*string` | `[user1]` |
30+
| `stringListNullableMultiple2` | A nullable list of strings with multiple values. | `[]*string` | `[user1, user2]` |
31+
32+
33+
### Object lists
34+
35+
| Name | Description | Type | Value |
36+
| ------------------------ | -------------------------------------------- | ---------------- | -------------------------------------------------- |
37+
| `objectList` | List of nested objects | `[]nestedObject` | `[]` |
38+
| `objectList[0].name` | String field | `string` | `example` |
39+
| `objectList[0].foo` | Object field with custom declared type | `object` | `{}` |
40+
| `objectList[0].foo.fizz` | Nested int field | `int` | `10` |
41+
| `objectList[0].foo.buzz` | Nested quantity field, nullable | `*string` | `1GiB` |
42+
| `objectList[0].bar` | Another object field of custom declared type | `object` | `{}` |
43+
| `objectList[0].bar.fizz` | Nested int field | `int` | `20` |
44+
| `objectList[0].bar.buzz` | Nested quantity field, nullable | `*string` | `2GiB` |
45+
| `objectList[1].name` | String field | `string` | `example 2 - not expected to appear in the README` |
46+
| `objectList[1].foo` | Object field with custom declared type | `object` | `{}` |
47+
| `objectList[1].foo.fizz` | Nested int field | `int` | `10` |
48+
| `objectList[1].foo.buzz` | Nested quantity field, nullable | `*string` | `1GiB` |
49+
| `objectList[1].bar` | Another object field of custom declared type | `object` | `{}` |
50+
| `objectList[1].bar.fizz` | Nested int field | `int` | `20` |
51+
| `objectList[1].bar.buzz` | Nested quantity field, nullable | `*string` | `2GiB` |
52+
53+

0 commit comments

Comments
 (0)