burnin: Add unittest for supported disk templates
[ganeti-local] / test / py / gnt-cli.test
1 # test the various gnt-commands for common options
2 $SCRIPTS/gnt-node --help
3 >>>/Usage:/
4 >>>2
5 >>>= 0
6 $SCRIPTS/gnt-node UNKNOWN
7 >>>/Usage:/
8 >>>2
9 >>>= 1
10 $SCRIPTS/gnt-node --version
11 >>>/^gnt-/
12 >>>2
13 >>>= 0
14
15 $SCRIPTS/gnt-instance --help
16 >>>/Usage:/
17 >>>2
18 >>>= 0
19 $SCRIPTS/gnt-instance UNKNOWN
20 >>>/Usage:/
21 >>>2
22 >>>= 1
23 $SCRIPTS/gnt-instance --version
24 >>>/^gnt-instance/
25 >>>2
26 >>>= 0
27
28 $SCRIPTS/gnt-os --help
29 >>>/Usage:/
30 >>>2
31 >>>= 0
32 $SCRIPTS/gnt-os UNKNOWN
33 >>>/Usage:/
34 >>>2
35 >>>= 1
36 $SCRIPTS/gnt-os --version
37 >>>/^gnt-/
38 >>>2
39 >>>= 0
40
41 $SCRIPTS/gnt-group --help
42 >>>/Usage:/
43 >>>2
44 >>>= 0
45 $SCRIPTS/gnt-group UNKNOWN
46 >>>/Usage:/
47 >>>2
48 >>>= 1
49 $SCRIPTS/gnt-group --version
50 >>>/^gnt-/
51 >>>2
52 >>>= 0
53
54 $SCRIPTS/gnt-job --help
55 >>>/Usage:/
56 >>>2
57 >>>= 0
58 $SCRIPTS/gnt-job UNKNOWN
59 >>>/Usage:/
60 >>>2
61 >>>= 1
62 $SCRIPTS/gnt-job --version
63 >>>/^gnt-/
64 >>>2
65 >>>= 0
66
67 $SCRIPTS/gnt-cluster --help
68 >>>/Usage:/
69 >>>2
70 >>>= 0
71 $SCRIPTS/gnt-cluster UNKNOWN
72 >>>/Usage:/
73 >>>2
74 >>>= 1
75 $SCRIPTS/gnt-cluster --version
76 >>>/^gnt-/
77 >>>2
78 >>>= 0
79
80 $SCRIPTS/gnt-backup --help
81 >>>/Usage:/
82 >>>2
83 >>>= 0
84 $SCRIPTS/gnt-backup UNKNOWN
85 >>>/Usage:/
86 >>>2
87 >>>= 1
88 $SCRIPTS/gnt-backup --version
89 >>>/^gnt-/
90 >>>2
91 >>>= 0
92
93 $SCRIPTS/gnt-debug --help
94 >>>/Usage:/
95 >>>2
96 >>>= 0
97 $SCRIPTS/gnt-debug UNKNOWN
98 >>>/Usage:/
99 >>>2
100 >>>= 1
101 $SCRIPTS/gnt-debug --version
102 >>>/^gnt-/
103 >>>2
104 >>>= 0
105
106 # test that verifies all sub-commands can be run with --help, checking
107 # that optparse doesn't reject the options list
108 set -e; for c in scripts/gnt-*; do for i in $($c --help|grep '^ [^ ]'|awk '{print $1}'); do echo Checking command ${c##/}/$i; $c $i --help >/dev/null; done; done
109 >>>= 0