Skip to content

Commit 8f722da

Browse files
committed
[test] Updated results for v0.6.3
Signed-off-by: Nick Volynkin <nick.volynkin@gmail.com>
1 parent 84c82b4 commit 8f722da

File tree

17 files changed

+335
-74
lines changed

17 files changed

+335
-74
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include ../test.mk
1+
include ../test.mk

test/fields/README.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,20 @@
33
Test case for complex object with `field`s declared inside them.
44

55
## Parameters
6+
### Declaration through custom type
7+
8+
| Name | Description | Type | Value |
9+
| ----- | --------------------- | -------- | ----- |
10+
| `foo` | Configuration for foo | `object` | `{}` |
11+
12+
13+
### Declaration with direct path
14+
15+
| Name | Description | Type | Value |
16+
| --------------- | --------------------------------------- | -------- | ----- |
17+
| `bar` | Configuration for bar | `object` | `{}` |
18+
| `bar.db` | Field with custom type declared locally | `object` | `{}` |
19+
| `bar.db.size` | Sub-field declared with absolute path | `string` | `""` |
20+
| `bar.db.volume` | Sub-field declared with absolute path | `string` | `""` |
21+
622

7-
### Complex Object tests
8-
9-
| Name | Description | Type | Value |
10-
| --------------- | ---------------------------------------------------- | -------- | ------ |
11-
| `foo` | Configuration for foo | `object` | `null` |
12-
| `foo.db` | Field with custom type declared locally | `object` | |
13-
| `foo.db.size` | Sub-field declared with path relative to custom type | `string` | |
14-
| `bar` | Configuration for bar | `object` | `null` |
15-
| `bar.db` | Field with custom type declared locally | `object` | |
16-
| `bar.db.size` | Sub-field declared with path relative to custom type | `string` | |
17-
| `bar.db.volume` | Sub-field declared with absolute path | `string` | |

test/fields/values.schema.json

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,37 @@
55
"bar": {
66
"description": "Configuration for bar",
77
"type": "object",
8+
"default": {
9+
"db": {
10+
"size": "10Gi",
11+
"volume": "10Gi"
12+
}
13+
},
814
"required": [
915
"db"
1016
],
1117
"properties": {
1218
"db": {
1319
"description": "Field with custom type declared locally",
1420
"type": "object",
21+
"default": {
22+
"size": "10Gi",
23+
"volume": "10Gi"
24+
},
1525
"required": [
16-
"size"
26+
"size",
27+
"volume"
1728
],
1829
"properties": {
1930
"size": {
2031
"description": "Sub-field declared with path relative to custom type",
21-
"type": "string"
32+
"type": "string",
33+
"default": "10Gi"
34+
},
35+
"volume": {
36+
"description": "Sub-field declared with path relative to custom type",
37+
"type": "string",
38+
"default": "10Gi"
2239
}
2340
}
2441
}
@@ -27,21 +44,37 @@
2744
"foo": {
2845
"description": "Configuration for foo",
2946
"type": "object",
47+
"default": {
48+
"db": {
49+
"size": "10Gi",
50+
"volume": "10Gi"
51+
}
52+
},
3053
"required": [
3154
"db"
3255
],
3356
"properties": {
3457
"db": {
3558
"description": "Field with custom type declared locally",
3659
"type": "object",
60+
"default": {
61+
"size": "10Gi",
62+
"volume": "10Gi"
63+
},
3764
"required": [
38-
"size"
65+
"size",
66+
"volume"
3967
],
4068
"properties": {
4169
"size": {
4270
"description": "Sub-field declared with path relative to custom type",
4371
"type": "string",
4472
"default": "10Gi"
73+
},
74+
"volume": {
75+
"description": "Sub-field declared with path relative to custom type",
76+
"type": "string",
77+
"default": "10Gi"
4578
}
4679
}
4780
}

test/fields/values.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
1-
## @section Complex Object tests
1+
## @section Declaration through custom type
22

33
## @param foo {foo} Configuration for foo
44
## @field foo.db {fooDB} Field with custom type declared locally
55
## @field fooDB.size {string} Sub-field declared with path relative to custom type
6+
## @field fooDB.volume {string} Sub-field declared with path relative to custom type
67

78
foo:
89
db:
910
size: 10Gi
11+
volume: 10Gi
12+
13+
## @section Declaration with direct path
1014

1115
## @param bar {bar} Configuration for bar
12-
## @field bar.db {barDB} Field with custom type declared locally
13-
## @field barDB.size {string} Sub-field declared with path relative to custom type
16+
## @field bar.db {fooDB} Field with custom type declared locally
17+
## @field bar.db.size {string} Sub-field declared with absolute path
1418
## @field bar.db.volume {string} Sub-field declared with absolute path
15-
1619
bar:
1720
db:
1821
size: 10Gi
1922
volume: 10Gi
2023

24+

0 commit comments

Comments
 (0)