Skip to content

Commit b5a5a5e

Browse files
committed
chore: address PR feedback
1 parent eca4656 commit b5a5a5e

5 files changed

Lines changed: 16 additions & 22 deletions

File tree

.github/workflows/ws-e2e-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ jobs:
2424
working-directory: testing
2525
steps:
2626
- name: Checkout code
27-
uses: actions/checkout@v4
27+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2828

2929
- name: Set up Go
30-
uses: actions/setup-go@v5
30+
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
3131
with:
3232
go-version: ${{ env.GO_VERSION }}
3333
cache: false
@@ -39,7 +39,7 @@ jobs:
3939
echo "cache_key=testing-bin-${{ runner.os }}-go${{ env.GO_VERSION }}-$VERSION_HASH" >> $GITHUB_OUTPUT
4040
4141
- name: Cache testing/bin directory
42-
uses: actions/cache@v4
42+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
4343
id: cache-testing-bin
4444
with:
4545
path: testing/bin

developing/scripts/setup-istio.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,12 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
99
DEVELOPING_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
1010
LOCALBIN="${DEVELOPING_DIR}/bin"
1111

12-
# Determine istioctl path - prefer LOCALBIN, fallback to PATH
12+
# Require istioctl from LOCALBIN to ensure a known version
1313
if [ -f "${LOCALBIN}/istioctl" ]; then
1414
ISTIOCTL="${LOCALBIN}/istioctl"
15-
elif command -v istioctl >/dev/null 2>&1; then
16-
ISTIOCTL="istioctl"
1715
else
1816
echo "ERROR: istioctl is not installed. Please install istioctl first:"
1917
echo " cd developing && make istioctl"
20-
echo " or visit: https://istio.io/latest/docs/setup/getting-started/#download"
2118
exit 1
2219
fi
2320

testing/Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,19 @@ help: ## Display this help.
4848
.PHONY: build-controller build-backend build-frontend build-all e2e sanity-check
4949

5050
deploy-controller: kind check-kind-context ## Build and deploy the controller.
51-
cd ../workspaces/controller && $(MAKE) docker-build IMG=$(CONTROLLER_IMG)
51+
$(MAKE) -C ../workspaces/controller docker-build IMG=$(CONTROLLER_IMG)
5252
$(KIND) load docker-image $(CONTROLLER_IMG) --name $(KIND_CLUSTER_NAME)
53-
cd ../workspaces/controller && $(MAKE) deploy IMG=$(CONTROLLER_IMG)
53+
$(MAKE) -C ../workspaces/controller deploy IMG=$(CONTROLLER_IMG)
5454

5555
deploy-backend: kind check-kind-context ## Build and deploy the backend.
56-
cd ../workspaces/backend && $(MAKE) docker-build IMG=$(BACKEND_IMG)
56+
$(MAKE) -C ../workspaces/backend docker-build IMG=$(BACKEND_IMG)
5757
$(KIND) load docker-image $(BACKEND_IMG) --name $(KIND_CLUSTER_NAME)
58-
cd ../workspaces/backend && $(MAKE) deploy IMG=$(BACKEND_IMG)
58+
$(MAKE) -C ../workspaces/backend deploy IMG=$(BACKEND_IMG)
5959

6060
deploy-frontend: kind check-kind-context ## Build and deploy the frontend.
61-
cd ../workspaces/frontend && $(MAKE) docker-build IMG=$(FRONTEND_IMG)
61+
$(MAKE) -C ../workspaces/frontend docker-build IMG=$(FRONTEND_IMG)
6262
$(KIND) load docker-image $(FRONTEND_IMG) --name $(KIND_CLUSTER_NAME)
63-
cd ../workspaces/frontend && $(MAKE) deploy IMG=$(FRONTEND_IMG)
63+
$(MAKE) -C ../workspaces/frontend deploy IMG=$(FRONTEND_IMG)
6464

6565
deploy-all: deploy-controller deploy-backend deploy-frontend ## Deploy all components.
6666

@@ -108,7 +108,7 @@ $(ISTIOCTL): $(LOCALBIN)
108108

109109
.PHONY: dependency-hash
110110
dependency-hash: ## Calculate hash of dependency versions for caching.
111-
@echo -e "KIND_VERSION=$(KIND_VERSION)\nISTIOCTL_VERSION=$(ISTIOCTL_VERSION)" | sha256sum | cut -d' ' -f1 | head -c 16
111+
@echo -e "KIND_VERSION=$(KIND_VERSION)\nISTIOCTL_VERSION=$(ISTIOCTL_VERSION)" | sha256sum | cut -d' ' -f1
112112

113113
.PHONY: setup-cluster
114114
setup-cluster: check-kubectl kind istioctl ## Set up a complete kind cluster with cert-manager and Istio.

testing/scripts/sanity-check.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ check_http_endpoint() {
5959
# Wait for port-forward to be ready
6060
local retries=0
6161
local max_retries=10
62-
while ! curl -s -o /dev/null "http://localhost:${local_port}${probe_path}" 2>/dev/null; do
62+
while ! curl --silent --output /dev/null "http://localhost:${local_port}${probe_path}" 2>/dev/null; do
6363
retries=$((retries + 1))
6464
if [ ${retries} -ge ${max_retries} ]; then
6565
echo "✗ ERROR: ${label} endpoint not reachable after ${max_retries} attempts"
@@ -70,7 +70,7 @@ check_http_endpoint() {
7070

7171
# Verify we get a successful response
7272
local http_code
73-
http_code=$(curl -s -o /dev/null -w "%{http_code}" "http://localhost:${local_port}${probe_path}")
73+
http_code=$(curl --silent --output /dev/null --write-out "%{http_code}" "http://localhost:${local_port}${probe_path}")
7474

7575
if [ "${http_code}" -ge 200 ] && [ "${http_code}" -lt 400 ]; then
7676
echo "${label} HTTP endpoint returned ${http_code}"
@@ -143,7 +143,7 @@ check_gateway_route() {
143143
# Wait for port-forward to be ready and verify routing
144144
local retries=0
145145
local max_retries=10
146-
while ! curl -sk -o /dev/null "https://localhost:${local_port}${request_path}" 2>/dev/null; do
146+
while ! curl --silent --insecure --output /dev/null "https://localhost:${local_port}${request_path}" 2>/dev/null; do
147147
retries=$((retries + 1))
148148
if [ ${retries} -ge ${max_retries} ]; then
149149
echo "✗ ERROR: ${label} gateway route not reachable after ${max_retries} attempts"
@@ -153,7 +153,7 @@ check_gateway_route() {
153153
done
154154

155155
local http_code
156-
http_code=$(curl -sk -o /dev/null -w "%{http_code}" "https://localhost:${local_port}${request_path}")
156+
http_code=$(curl --silent --insecure --output /dev/null --write-out "%{http_code}" "https://localhost:${local_port}${request_path}")
157157

158158
if [ "${http_code}" -ge 200 ] && [ "${http_code}" -lt 400 ]; then
159159
echo "${label} gateway route returned ${http_code}"

testing/scripts/setup-istio.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,12 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
1010
TESTING_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
1111
LOCALBIN="${TESTING_DIR}/bin"
1212

13-
# Determine istioctl path - prefer LOCALBIN, fallback to PATH
13+
# Require istioctl from LOCALBIN to ensure a known version
1414
if [ -f "${LOCALBIN}/istioctl" ]; then
1515
ISTIOCTL="${LOCALBIN}/istioctl"
16-
elif command -v istioctl >/dev/null 2>&1; then
17-
ISTIOCTL="istioctl"
1816
else
1917
echo "ERROR: istioctl is not installed. Please install istioctl first:"
2018
echo " cd testing && make istioctl"
21-
echo " or visit: https://istio.io/latest/docs/setup/getting-started/#download"
2219
exit 1
2320
fi
2421

0 commit comments

Comments
 (0)