aboutsummaryrefslogtreecommitdiffstats
path: root/test/02-list.test
blob: 075632ee583e2d775547f44016736eea5d05fd59 (plain) (blame)
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
#!/bin/sh

header "bosun list"

want <<EOF
app-foo
service-bar
EOF

assert success "list active" "$BOSUN_CMD" list active
assert_output_matches "lists active roles"

assert success "list" "$BOSUN_CMD" list
assert_output_matches "lists active roles"

want <<EOF
app-foo
host-baz
service-bar
EOF

assert success "list all" "$BOSUN_CMD" list all
assert_output_matches "lists all roles"

want <<EOF
host-baz
EOF

assert success "list available" "$BOSUN_CMD" list available
assert_output_matches "lists available roles"

want <<EOF
bosun: no such list type 'foo'. Try: active, all, available
EOF

assert failure "list foo" "$BOSUN_CMD" list foo
assert_output_matches "prints error message"

end