Browse code

Add additional tests and make etcd dir stable

Clayton Coleman authored on 2014/08/28 06:03:50
Showing 2 changed files
... ...
@@ -28,6 +28,9 @@ GO_OUT=$(dirname $0)/../output/go/bin
28 28
 out=$(${GO_OUT}/openshift version)
29 29
 echo openshift: $out
30 30
 
31
+# Remove any local data
32
+rm -rf $(dirname $0)/../openshift.local.etcd/
33
+
31 34
 # Start openshift
32 35
 ${GO_OUT}/openshift start 1>&2 &
33 36
 OS_PID=$!
... ...
@@ -38,13 +41,15 @@ wait_for_url "http://127.0.0.1:${API_PORT}/healthz" "apiserver: "
38 38
 KUBE_CMD="${GO_OUT}/openshift kube -h http://127.0.0.1:${API_PORT} --expect_version_match"
39 39
 
40 40
 ${KUBE_CMD} list pods
41
-echo "kubecfg(pods): ok"
41
+${KUBE_CMD} -c examples/hello-openshift/hello-pod.json create pods
42
+${KUBE_CMD} delete pods/hello-openshift
43
+echo "kube(pods): ok"
42 44
 
43 45
 ${KUBE_CMD} list services
44 46
 ${KUBE_CMD} -c examples/test-service.json create services
45 47
 ${KUBE_CMD} delete services/frontend
46
-echo "kubecfg(services): ok"
48
+echo "kube(services): ok"
47 49
 
48 50
 ${KUBE_CMD} list minions
49 51
 ${KUBE_CMD} get minions/127.0.0.1
50
-echo "kubecfg(minions): ok"
52
+echo "kube(minions): ok"
... ...
@@ -59,6 +59,8 @@ func startAllInOne() {
59 59
 	etcdServers := []string{} // default
60 60
 	etcdConfig := etcdconfig.New()
61 61
 	etcdConfig.BindAddr = etcdAddr
62
+	etcdConfig.DataDir = "openshift.local.etcd"
63
+	etcdConfig.NameFromHostname()
62 64
 	etcdServer := etcd.New(etcdConfig)
63 65
 	go util.Forever(func() {
64 66
 		glog.Infof("Started etcd at http://%s", etcdAddr)