Merge branch 'stable-2.6-esi' into stable-2.6-ippool-hotplug-esi
[ganeti-local] / test / gnt-cli.test
1 # test the various gnt-commands for common options
2 $SCRIPTS/gnt-node --help
3 >>>/Usage:/
4 >>>2
5 >>>= 1
6 $SCRIPTS/gnt-node --version
7 >>>/^gnt-/
8 >>>2
9 >>>= 0
10
11 $SCRIPTS/gnt-instance --help
12 >>>/Usage:/
13 >>>2
14 >>>= 1
15 $SCRIPTS/gnt-instance --version
16 >>>/^gnt-instance/
17 >>>2
18 >>>= 0
19
20 $SCRIPTS/gnt-os --help
21 >>>/Usage:/
22 >>>2
23 >>>= 1
24 $SCRIPTS/gnt-os --version
25 >>>/^gnt-/
26 >>>2
27 >>>= 0
28
29 $SCRIPTS/gnt-group --help
30 >>>/Usage:/
31 >>>2
32 >>>= 1
33 $SCRIPTS/gnt-group --version
34 >>>/^gnt-/
35 >>>2
36 >>>= 0
37
38 $SCRIPTS/gnt-job --help
39 >>>/Usage:/
40 >>>2
41 >>>= 1
42 $SCRIPTS/gnt-job --version
43 >>>/^gnt-/
44 >>>2
45 >>>= 0
46
47 $SCRIPTS/gnt-cluster --help
48 >>>/Usage:/
49 >>>2
50 >>>= 1
51 $SCRIPTS/gnt-cluster --version
52 >>>/^gnt-/
53 >>>2
54 >>>= 0
55
56 $SCRIPTS/gnt-backup --help
57 >>>/Usage:/
58 >>>2
59 >>>= 1
60 $SCRIPTS/gnt-backup --version
61 >>>/^gnt-/
62 >>>2
63 >>>= 0
64
65 $SCRIPTS/gnt-debug --help
66 >>>/Usage:/
67 >>>2
68 >>>= 1
69 $SCRIPTS/gnt-debug --version
70 >>>/^gnt-/
71 >>>2
72 >>>= 0
73
74 # test that verifies all sub-commands can be run with --help, checking
75 # that optparse doesn't reject the options list
76 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
77 >>>= 0