Skip to content

Commit

Permalink
add smoking test
Browse files Browse the repository at this point in the history
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
  • Loading branch information
spacewander committed Jul 29, 2024
1 parent 8d23829 commit 312ebaf
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/release-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ jobs:
helm dependency list $dir 2> /dev/null | tail +2 | head -n -1 | awk '{ print "helm repo add " $1 " " $3 }' | while read cmd; do $cmd; done
done
- name: Smoking test
working-directory: ./e2e
run: |
make create-cluster deploy-istio-to-verify-helm-install
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.6.0
with:
Expand Down
4 changes: 4 additions & 0 deletions e2e/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ e2e-prepare-data-plane-image: kind
deploy-istio: helm
ISTIO_VERSION=$(ISTIO_VERSION) LOCALBIN=$(LOCALBIN) ./istio.sh install

.PHONY: deploy-istio-to-verify-helm-install
deploy-istio-to-verify-helm-install: helm
ISTIO_VERSION=$(ISTIO_VERSION) LOCALBIN=$(LOCALBIN) ./istio.sh installWithoutOptions

.PHONY: run-e2e
run-e2e:
PATH=$(LOCALBIN):"$(PATH)" go test -v ./... || (bash -x ./collect_e2e_logs.sh; exit -1)
Expand Down
19 changes: 17 additions & 2 deletions e2e/istio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,39 @@ HELM="${LOCALBIN}/helm"
E2E_DIR="$(pwd)"

install() {
OPTIONS_DISABLED="$1"

pushd ../manifests/charts

$HELM dependency update htnn-controller
$HELM dependency update htnn-gateway
$HELM package htnn-controller htnn-controller
$HELM package htnn-gateway htnn-gateway

$HELM install htnn-controller htnn-controller --namespace istio-system --create-namespace --wait -f "$E2E_DIR/htnn_controller_values.yaml" \
CONTROLLER_VALUES_OPT="-f $E2E_DIR/htnn_controller_values.yaml"
GATEWAY_VALUES_OPT="-f $E2E_DIR/htnn_gateway_values.yaml"
if [ -n "$OPTIONS_DISABLED" ]; then
CONTROLLER_VALUES_OPT=
GATEWAY_VALUES_OPT=
fi

# shellcheck disable=SC2086
$HELM install htnn-controller htnn-controller --namespace istio-system --create-namespace --wait $CONTROLLER_VALUES_OPT \
|| exitWithAnalysis

$HELM install htnn-gateway htnn-gateway --namespace istio-system --create-namespace -f "$E2E_DIR/htnn_gateway_values.yaml" \
# shellcheck disable=SC2086
$HELM install htnn-gateway htnn-gateway --namespace istio-system --create-namespace $GATEWAY_VALUES_OPT \
&& \
(kubectl wait --timeout=5m -n istio-system deployment/istio-ingressgateway --for=condition=Available \
|| exitWithAnalysis)

popd
}

installWithoutOptions() {
install WithoutOptions
}

exitWithAnalysis() {
kubectl get pods -n istio-system -o yaml
for pod in $(kubectl get pods -n istio-system | grep 'istiod-' | awk '{print $1}'); do
Expand Down

0 comments on commit 312ebaf

Please sign in to comment.