Skip to content

Commit 438f63c

Browse files
committed
Docs the e2e test script
Signed-off-by: Daneyon Hansen <[email protected]>
1 parent abc1f8f commit 438f63c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

hack/test-e2e.sh

+21
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,25 @@
11
#!/bin/bash
2+
#
3+
# This script verifies end-to-end connectivity for an example inference extension test environment based on
4+
# resources from the quickstart guide or e2e test framework. It can optionally launch a "curl" client pod to
5+
# run these tests within the cluster.
6+
#
7+
# USAGE: ./hack/e2e-test.sh
8+
#
9+
# OPTIONAL ENVIRONMENT VARIABLES:
10+
# - TIME: The duration (in seconds) for which the test will run. Defaults to 1 second.
11+
# - CURL_POD: If set to "true", the script will use a Kubernetes pod named "curl" for making requests.
12+
# - IP: Override the detected IP address. If not provided, the script attempts to use a Gateway based on
13+
# the quickstart guide or an Envoy service IP based on the e2e test framework.
14+
# - PORT: Override the detected port. If not provided, the script attempts to use a Gateway based on the
15+
# quickstart guide or an Envoy service IP based on the e2e test framework.
16+
#
17+
# WHAT THE SCRIPT DOES:
18+
# 1. Determines if there is a Gateway named "inference-gateway" in the "default" namespace. If found, it extracts the IP
19+
# address and port from the Gateway's "llm-gw" listener. Otherwise, it falls back to the Envoy service in the "default" namespace.
20+
# 2. Optionally checks for (or creates) a "curl" pod, ensuring it is ready to execute requests.
21+
# 3. Loops for $TIME seconds, sending requests every 5 seconds to the /v1/completions endpoint to confirm successful connectivity.
22+
223
set -euo pipefail
324

425
# Determine the directory of this script and build an absolute path to client.yaml.

0 commit comments

Comments
 (0)