Files
helmfile/test/integration/lib/ensure.sh
T
Ceriath fc3a5ea374 fix(integration-tests): read correct minikube status (#1768) (#1769)
Resolves #1768 by using the correct status fields

Signed-off-by: Niklas Ott <n.ott@syseleven.de>
2024-11-05 22:24:36 +08:00

29 lines
786 B
Bash

#!/usr/bin/env bash
# Check environment is correctly setup
if ! hash minikube 2>/dev/null; then
fail "Minikube needs to be installed."
fi
if [ ! "$(minikube status --format '{{.Host}}')" == "Running" ]; then
fail "Minikube is not running."
fi
if [ ! "$(minikube status --format '{{.APIServer}}')" == "Running" ]; then
fail "Minikube Cluster is not running."
fi
if ! kubectl version 1> /dev/null; then
fail "Could not connect to minikube apiserver"
fi
if ! hash curl 1>/dev/null; then
fail "curl needs to be installed."
fi
if ! hash docker 1>/dev/null; then
fail "Docker needs to be installed."
fi
if ! docker version 1> /dev/null; then
fail "Could not connect to Docker daemon"
fi
if ! hash helm 1>/dev/null; then
fail "Helm needs to be installed."
fi