Replace kubecfg with kubectl in e2e tests

This commit is contained in:
Jeff Lowdermilk
2015-02-03 09:30:03 -08:00
parent a31cc679bf
commit 890615d93e
7 changed files with 39 additions and 60 deletions

View File

@@ -29,23 +29,21 @@ source "${KUBE_ROOT}/cluster/$KUBERNETES_PROVIDER/util.sh"
GUESTBOOK="${KUBE_ROOT}/examples/guestbook"
# Launch the guestbook example
$KUBECFG -c "${GUESTBOOK}/redis-master.json" create /pods
$KUBECFG -c "${GUESTBOOK}/redis-master-service.json" create /services
$KUBECFG -c "${GUESTBOOK}/redis-slave-controller.json" create /replicationControllers
${KUBECTL} create -f "${GUESTBOOK}"
sleep 5
sleep 15
POD_LIST_1=$($KUBECFG '-template={{range.items}}{{.id}} {{end}}' list pods)
POD_LIST_1=$(${KUBECTL} get pods -o template '--template={{range.items}}{{.id}} {{end}}')
echo "Pods running: ${POD_LIST_1}"
$KUBECFG stop redis-slave-controller
# Needed until issue #103 gets fixed
sleep 25
$KUBECFG rm redis-slave-controller
$KUBECFG delete services/redis-master
$KUBECFG delete pods/redis-master
# TODO make this an actual test. Open up a firewall and use curl to post and
# read a message via the frontend
POD_LIST_2=$($KUBECFG '-template={{range.items}}{{.id}} {{end}}' list pods)
${KUBECTL} stop rc redis-slave-controller
${KUBECTL} delete services redis-master
${KUBECTL} delete pods redis-master
POD_LIST_2=$(${KUBECTL} get pods -o template '--template={{range.items}}{{.id}} {{end}}')
echo "Pods running after shutdown: ${POD_LIST_2}"
exit 0