-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathplatform-1-test.sh
More file actions
67 lines (47 loc) · 1 KB
/
platform-1-test.sh
File metadata and controls
67 lines (47 loc) · 1 KB
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
#!/usr/bin/env roundup
#
#/ usage: rerun stubbs:test -m accept -p platform [--answers <>]
#
# Helpers
# -------
[[ -f ./functions.sh ]] && . ./functions.sh
# The Plan
# --------
describe "platform"
source ../lib/platform.sh
TEST_ROOT="$(mktemp -d /tmp/roundup-test.XXX)"
it_deploys_deis_platform() {
local etcd_checked=1
local deis_built=1
local cluster_checked=1
function check-etcd-alive {
etcd_checked=0
}
function deisctl {
[ ${1} == "config" ] &&
[ ${2} == "platform" ] && return 0
[ ${1} == "install" ] && return 0
[ ${1} == "start" ] && return 0
return 1
}
function build-deis {
deis_built=0
}
function _check-cluster {
cluster_checked=0
}
deploy-deis
[ ${etcd_checked} ] &&
[ ${deis_built} ] &&
[ ${cluster_checked} ]
}
it_fails_when_arg_mismatch() {
! deploy-deis # requires arguments
}
it_undeploys_deis() {
function deisctl {
[[ ${@} == "stop platform" ]] ||
[[ ${@} == "uninstall platform" ]]
}
undeploy-deis
}