Commit | Line | Data |
---|---|---|
bed7233f PP |
1 | #!/usr/bin/env bats |
2 | ||
3 | load ../../../common | |
4 | load ../../common | |
5 | ||
6 | @test 'unknown property in enum type object makes barectf fail' { | |
7 | barectf_assert_file_exists unknown-prop.yaml | |
8 | barectf_config_check_fail | |
9 | } | |
10 | ||
11 | @test 'no "value-type" property in enum type object makes barectf fail' { | |
12 | barectf_assert_file_exists vt-no.yaml | |
13 | barectf_config_check_fail | |
14 | } | |
15 | ||
16 | @test 'wrong "value-type" property type in enum type object makes barectf fail' { | |
17 | barectf_assert_file_exists vt-invalid-type.yaml | |
18 | barectf_config_check_fail | |
19 | } | |
20 | ||
21 | @test 'no "members" property in enum type object makes barectf fail' { | |
22 | barectf_assert_file_exists members-no.yaml | |
23 | barectf_config_check_fail | |
24 | } | |
25 | ||
26 | @test 'wrong "members" property type in enum type object makes barectf fail' { | |
27 | barectf_assert_file_exists members-invalid-type.yaml | |
28 | barectf_config_check_fail | |
29 | } | |
30 | ||
31 | @test 'empty "members" property in enum type object makes barectf fail' { | |
32 | barectf_assert_file_exists members-empty.yaml | |
33 | barectf_config_check_fail | |
34 | } | |
35 | ||
36 | @test 'wrong "members" property element type in enum type object makes barectf fail' { | |
37 | barectf_assert_file_exists members-el-invalid-type.yaml | |
38 | barectf_config_check_fail | |
39 | } | |
40 | ||
41 | @test 'unknown property in enum type member object makes barectf fail' { | |
42 | barectf_assert_file_exists members-el-member-unknown-prop.yaml | |
43 | barectf_config_check_fail | |
44 | } | |
45 | ||
46 | @test 'wrong "label" property type in enum type member object makes barectf fail' { | |
47 | barectf_assert_file_exists members-el-member-label-invalid-type.yaml | |
48 | barectf_config_check_fail | |
49 | } | |
50 | ||
51 | @test 'wrong "value" property type in enum type member object makes barectf fail' { | |
52 | barectf_assert_file_exists members-el-member-value-invalid-type.yaml | |
53 | barectf_config_check_fail | |
54 | } | |
55 | ||
56 | @test '"value" property outside the unsigned value type range in enum type member object makes barectf fail' { | |
57 | barectf_assert_file_exists members-el-member-value-outside-range-unsigned.yaml | |
58 | barectf_config_check_fail | |
59 | } | |
60 | ||
61 | @test '"value" property outside the signed value type range in enum type member object makes barectf fail' { | |
62 | barectf_assert_file_exists members-el-member-value-outside-range-signed.yaml | |
63 | barectf_config_check_fail | |
64 | } | |
65 | ||
66 | @test 'overlapping members in enum type object makes barectf fail' { | |
67 | barectf_assert_file_exists members-overlap.yaml | |
68 | barectf_config_check_fail | |
69 | } |