aboutsummaryrefslogtreecommitdiffstats
path: root/test/01-add.test
blob: b4d223f91a768b868426b2c16c89d16454c8a2e3 (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
#!/bin/sh

header "bosun add"

assert success "add host-baz" "$BOSUN_CMD" add host-baz

want <<EOF
./make.conf -> stow/host-baz/make.conf
./package.accept_keywords -> stow/service-bar/package.accept_keywords
./package.use/20-service-bar -> ../stow/service-bar/package.use/20-service-bar
./package.use/30-app-foo -> ../stow/app-foo/package.use/30-app-foo
EOF

have_links
assert_output_matches "adds role 'host-baz'"

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

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

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

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

end