Skip to content

Commit

Permalink
test: Enable k8s access test + tempest
Browse files Browse the repository at this point in the history
  • Loading branch information
ricolin committed Jan 13, 2025
1 parent 747cb58 commit 9645864
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions hack/run-tempest-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
# License for the specific language governing permissions and limitations
# under the License.

# This script will run the full functional tests for a given `KUBE_TAG`. It
# will download the image, create a cluster, wait for it to hit `CREATE_COMPLETE`
# and then run `sonobuoy` against it.

source /opt/stack/openrc admin admin

OS_DISTRO=${OS_DISTRO:-ubuntu}
Expand Down Expand Up @@ -169,6 +165,25 @@ if [[ ${UPGRADE_KUBE_TAG} != ${KUBE_TAG} ]]; then
fi
done

# Wait for kubernetes accessible and Ready.
for i in {1..10}; do
# Get the cluster configuration file
eval $(openstack coe cluster config k8s-cluster)
Node=$(kubectl get node -o wide)
if [[ ${Node} == *"NotReady"* ]]; then
echo "Kubernetes accessible with Not Ready node."
echo "Node status: ${Node}"
sleep 5
elif [[ ${Node} == *"Ready"* ]]; then
echo "Kubernetes accessible with Ready node."
break
else
echo "Currtny retry count: $i"
echo "Node status: ${Node}"
sleep 5
fi
done

# Upgrade cluster
openstack coe cluster upgrade k8s-cluster-upgrade k8s-${UPGRADE_KUBE_TAG}
# Wait for cluster to be "UPDATE_COMPLETE".
Expand Down

0 comments on commit 9645864

Please sign in to comment.