diff options
author | Wolfgang Müller | 2021-03-10 17:09:13 +0100 |
---|---|---|
committer | Wolfgang Müller | 2021-03-10 17:09:13 +0100 |
commit | 3bce19d12d93f1b27e7d2f2acbef0926417d5390 (patch) | |
tree | 3700afd21af95a0904be6aaf3378fc75e3955b10 /test/02-list.test | |
parent | 1d767c0bdd6476a4ba9a998b8953ec8b9ad9f21c (diff) | |
download | bosun-3bce19d12d93f1b27e7d2f2acbef0926417d5390.tar.gz |
Add a first draft of the test suite1.3.0
The introduction of a test suite makes future changes easier to
troubleshoot and verify. Whilst this is only a first draft, it should be
stable enough to be used in normal development and should cover the
entirety of bosun's functionality.
Diffstat (limited to '')
-rw-r--r-- | test/02-list.test | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/test/02-list.test b/test/02-list.test new file mode 100644 index 0000000..075632e --- /dev/null +++ b/test/02-list.test @@ -0,0 +1,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 |