Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hack/cel-validation/gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ func TestValidateGateway(t *testing.T) {
},
}
},
wantErrors: []string{"Invalid value: \"1.2.3.4:8080\": spec.addresses[0].value in body must be of type ipv4"},
wantErrors: []string{"Invalid value: \"1.2.3.4:8080\": status.addresses[0].value in body must be of type ipv4"},
},
{
desc: "duplicate ip address or hostname",
Expand Down
63 changes: 0 additions & 63 deletions hack/run-cel-validation-test.sh

This file was deleted.

18 changes: 15 additions & 3 deletions hack/verify-examples-kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ cleanup() {
return
fi

rm config/webhook/kustomization.yaml
rm -f config/webhook/kustomization.yaml

if [ "${KIND_CREATE_ATTEMPTED:-}" = true ]; then
kind delete cluster --name "${CLUSTER_NAME}" || true
fi
CLEANED_UP=true
}

trap cleanup INT TERM
trap cleanup INT TERM EXIT

# For exit code
res=0
Expand All @@ -53,7 +53,19 @@ res=0

# Create cluster
KIND_CREATE_ATTEMPTED=true
kind create cluster --name "${CLUSTER_NAME}" || res=$?
kind create cluster --name "${CLUSTER_NAME}"

# Verify CEL validations before installing webhook.
for CHANNEL in experimental standard; do
# Install CRDs.
kubectl apply -f "config/crd/${CHANNEL}/gateway*.yaml"

# Run tests.
go test -timeout=120s -count=1 sigs.k8s.io/gateway-api/hack/cel-validation

# Delete CRDs to reset environment.
kubectl delete -f "config/crd/${CHANNEL}/gateway*.yaml"
done

cat <<EOF >config/webhook/kustomization.yaml
resources:
Expand Down