aboutsummaryrefslogtreecommitdiffstats
path: root/test/05-remove.test
blob: 1fa7d35a3bdbdcd3c082d0d67bf674a808ee6732 (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
#!/bin/sh

header "bosun remove"

assert success "remove app-foo" "$BOSUN_CMD" remove app-foo

want <<EOF
./package.accept_keywords -> stow/service-bar/package.accept_keywords
./package.use -> stow/service-bar/package.use
EOF

have_links
assert_output_matches "removes role"

want <<EOF
bosun: this command requires at least one role
EOF

assert failure "remove" "$BOSUN_CMD" remove
assert_output_matches "prints error message"

want <<EOF
bosun: no such role 'role-missing' in $BOSUN_DIR
EOF

assert failure "remove role-missing" "$BOSUN_CMD" remove role-missing
assert_output_matches "prints error message"

end