-
Notifications
You must be signed in to change notification settings - Fork 228
/
Copy pathtest_release
executable file
·83 lines (76 loc) · 2.6 KB
/
test_release
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/usr/bin/env bash
# NOTE: this will test whatever version is installed locally. Install what you want first.
# pipefail is necessary for "command not found" to throw an error in these tests.
set -e -o pipefail
# these can be run against local changes by running `USE_BINRUN=1 ./scripts/postrelease/test_release` from repo root
if [[ -z "$USE_BINRUN" ]]; then
CMD_BIN="heroku"
else
CMD_BIN="./bin/run"
yarn
yarn build
fi
declare -a COMMANDS=(
"$CMD_BIN"
"$CMD_BIN whoami"
"$CMD_BIN access --app particleboard-staging"
"$CMD_BIN addons --app status-ui-staging"
"$CMD_BIN apps -p"
"$CMD_BIN apps -t heroku-front-end"
"$CMD_BIN apps:info --app heroku-cli-test-staging"
"$CMD_BIN auth:2fa"
"$CMD_BIN auth:whoami"
"$CMD_BIN authorizations"
"$CMD_BIN autocomplete"
"$CMD_BIN buildpacks:search ruby"
"$CMD_BIN certs --app particleboard-staging"
"$CMD_BIN ci --app particleboard-staging"
"$CMD_BIN ci --pipeline heroku-cli-test"
"$CMD_BIN ci:config --pipeline heroku-cli-test"
"$CMD_BIN clients"
"$CMD_BIN commands"
"$CMD_BIN domains --app status-ui-staging"
"$CMD_BIN drains --app heroku-cli-test-staging"
"$CMD_BIN features --app heroku-cli-test-staging"
"rm -rf ~/heroku-cli-test-staging && $CMD_BIN git:clone ~/heroku-cli-test-staging --app heroku-cli-test-staging && rm -rf ~/heroku-cli-test-staging" # `rm` used so it will always run locally
"$CMD_BIN help"
"$CMD_BIN --help"
"$CMD_BIN -h"
"$CMD_BIN keys"
"$CMD_BIN labs"
"$CMD_BIN local:version"
"$CMD_BIN maintenance --app heroku-cli-test-staging"
"$CMD_BIN members --team heroku-front-end"
"$CMD_BIN notifications"
"$CMD_BIN orgs"
"$CMD_BIN pg:backups --app particleboard-staging"
"$CMD_BIN pipelines"
"$CMD_BIN plugins:install api"
"$CMD_BIN plugins:install sudo"
"$CMD_BIN plugins"
"$CMD_BIN redis:info --app particleboard-staging"
"$CMD_BIN regions"
"$CMD_BIN releases --app heroku-cli-test-staging"
"$CMD_BIN run ls -a heroku-cli-test-staging -- --color"
"$CMD_BIN run -x -a heroku-cli-test-staging -- 'bash -c \"exit 0\"'"
"$CMD_BIN run:detached \"echo 'Hello World'\" -a heroku-cli-test-staging"
"$CMD_BIN sessions"
"$CMD_BIN spaces"
"$CMD_BIN status"
"$CMD_BIN teams"
"$CMD_BIN version"
"$CMD_BIN --version"
"$CMD_BIN -v"
"$CMD_BIN which authorizations"
)
# todo: how to test this?
# "$CMD_BIN login"
# todo: find a way to test commands that require 2fa
# "$CMD_BIN logs --app heroku-cli-test-staging"
# "$CMD_BIN config --app heroku-cli-test-staging"
# "$CMD_BIN webhooks --app heroku-cli-test-staging"
for cmd in "${COMMANDS[@]}"
do
echo -e "\n\n\nRUNNING: $cmd"
eval "$cmd"
done