bitnami-containers/.vib/kubectl/goss/kubectl.yaml

11 lines
354 B
YAML

# Copyright VMware, Inc.
# SPDX-License-Identifier: APACHE-2.0
command:
check-kubectl-config:
{{- $context := printf "context_%s" (randAlpha 5) }}
exec: kubectl config set-context {{ $context }} && kubectl config view --output=jsonpath='{.contexts[0].name}' && rm ${HOME}/.kube/config
exit-status: 0
stdout:
- /^{{ $context }}$/