Skip to content

Commit 4ad045f

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

File tree

10 files changed

+143
-64
lines changed

10 files changed

+143
-64
lines changed

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/README.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,27 @@ 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+

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+

test/lists/README.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,27 @@
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 one value. | `[]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` | `[]` |
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+
29+

test/lists/values.schema.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
"intListMultiple": {
1313
"description": "A list of integers with one value.",
1414
"type": "array",
15+
"default": [
16+
80,
17+
8080
18+
],
1519
"items": {
1620
"type": "integer"
1721
}
@@ -26,20 +30,30 @@
2630
"intListNullableMultiple": {
2731
"description": "A nullable list of integers with multiple values.",
2832
"type": "array",
33+
"default": [
34+
80,
35+
8080
36+
],
2937
"items": {
3038
"type": "integer"
3139
}
3240
},
3341
"intListNullableSingle": {
3442
"description": "A nullable list of integers with one value.",
3543
"type": "array",
44+
"default": [
45+
80
46+
],
3647
"items": {
3748
"type": "integer"
3849
}
3950
},
4051
"intListSingle": {
4152
"description": "A list of integers with one value.",
4253
"type": "array",
54+
"default": [
55+
80
56+
],
4357
"items": {
4458
"type": "integer"
4559
}
@@ -54,6 +68,10 @@
5468
"stringListMultiple": {
5569
"description": "A required list of strings with multiple values.",
5670
"type": "array",
71+
"default": [
72+
"user1",
73+
"user2"
74+
],
5775
"items": {
5876
"type": "string"
5977
}
@@ -68,20 +86,30 @@
6886
"stringListNullableMultiple": {
6987
"description": "A nullable list of strings with multiple values.",
7088
"type": "array",
89+
"default": [
90+
"user1",
91+
"user2"
92+
],
7193
"items": {
7294
"type": "string"
7395
}
7496
},
7597
"stringListNullableSingle": {
7698
"description": "A nullable list of strings with one value.",
7799
"type": "array",
100+
"default": [
101+
"user1"
102+
],
78103
"items": {
79104
"type": "string"
80105
}
81106
},
82107
"stringListSingle": {
83108
"description": "A required list of strings with one value.",
84109
"type": "array",
110+
"default": [
111+
"user1"
112+
],
85113
"items": {
86114
"type": "string"
87115
}

test/template/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33

44
## Parameters
5-
65
### Test configuration
76

8-
| Name | Description | Type | Value |
9-
| ------ | ------------- | -------- | ------ |
10-
| `test` | Test variable | `object` | `null` |
7+
| Name | Description | Type | Value |
8+
| ------ | ------------- | -------- | ----- |
9+
| `test` | Test variable | `object` | `{}` |
10+
11+

test/template/values.schema.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"type": "object",
44
"properties": {
55
"test": {
6-
"description": "Test variable"
6+
"description": "Test variable",
7+
"type": "object"
78
}
89
}
910
}

0 commit comments

Comments
 (0)