aboutsummaryrefslogtreecommitdiffstats
path: root/selftest/schema_test/schema_test.ok
blob: 846caaec2416e74deacfd8cc0cce0c48d9fde113 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
==== Testing dynamically generated schemas ====
schema_case_01.conf:
{'foobar.prefix.handover.duration': 'duration',
 'foobar.prefix.handover.threshold': 'uint'}
validating tests[0]
Validation: OK
validating tests[1]
--- foobar.prefix.handover.duration: ERR: ValueError: Invalid duration value: '22kkk'
Validation: Error
validating tests[2]
Validation: OK
validating tests[3]
--- -: ERR: ValueError: config item not known: 'foobar.wrongprefix.handover.duration'
Validation: Error
validating tests[4]
--- -: ERR: ValueError: config item not known: 'foobar.wrongprefix.handover'
Validation: Error
validating tests[5]
Validation: OK
validating tests[6]
--- foobar.prefix.handover.threshold: ERR: ValueError: Positive value expected instead of -2
Validation: Error
validating tests[7]
--- -: ERR: ValueError: config item not known: 'foobar.prefix.handover[].threshold'
Validation: Error
validating tests[8]
--- -: ERR: ValueError: config item is a list, should be 'uint': 'foobar.prefix.handover.threshold'
Validation: Error
----------------------
schema_case_02.conf:
{'foobar.prefix.hey.ho.letsgo[]': 'wrongtype'}
validating tests[0]
--- -: ERR: ValueError: unknown type 'wrongtype' at 'foobar.prefix.hey.ho.letsgo[]'
Validation: Error
----------------------
schema_case_03.conf:
--- -: ERR: AssertionError: 
config2schema: Error
----------------------
schema_case_04.conf:
--- -: ERR: AssertionError: 
config2schema: Error
----------------------
schema_case_05.conf:
{'foobar.prefix.hey.ho.letsgo[]': 'str'}
validating tests[0]
Validation: OK
validating tests[1]
Validation: OK
validating tests[2]
Validation: OK
validating tests[3]
--- -: ERR: ValueError: config item not known: 'foobar.prefix.hey.ho.letsgo'
Validation: Error
validating tests[4]
Validation: OK
validating tests[5]
--- -: ERR: ValueError: config item is dict but should be a leaf node of type 'str': 'foobar.prefix.hey.ho.letsgo[]'
Validation: Error
validating tests[6]
--- -: ERR: ValueError: config item is a list, should be 'str': 'foobar.prefix.hey.ho.letsgo[]'
Validation: Error
----------------------
schema_case_06.conf:
{'foobar.prefix.handover.anothervar': 'another_type',
 'foobar.prefix.handover.myvar': 'test_type',
 'foobar.prefix.handover.threshold': 'uint'}
validating tests[0]
Validation: OK
validating tests[1]
Validation: OK
validating tests[2]
Validation: OK
validating tests[3]
--- foobar.prefix.handover.myvar: ERR: ValueError: Invalid value 'invalid_val' for schema type 'test_type' (validator: test_validator)
Validation: Error
validating tests[4]
--- foobar.prefix.handover.anothervar: ERR: ValueError: Invalid value 'another_invalid_val' for schema type 'another_type' (validator: <lambda>)
Validation: Error
----------------------