Skip to content

Commit 26a5c6a

Browse files
authored
Add e2e test for multiport InferencePool enhancement (kubernetes-sigs/gateway-api-inference-extension#1885)
* Add e2e test for multi-port InferencePool * Make fixes based on reviewer feedback. * Address reviewer feedback; remove unusued function --------- Co-authored-by: Ryan Rosario <[email protected]>
1 parent 976d291 commit 26a5c6a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

test/utils/utils.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,8 @@ func checkCrdStatus(
338338
func ExecCommandInPod(testConfig *TestConfig, podName, containerName string, cmd []string) (string, error) {
339339
parameterCodec := runtime.NewParameterCodec(testConfig.Scheme)
340340

341+
// construct REST request to the API server.
342+
// podName is curl, that is where this is being sent.
341343
req := testConfig.KubeCli.CoreV1().RESTClient().
342344
Post().
343345
Resource("pods").
@@ -353,11 +355,13 @@ func ExecCommandInPod(testConfig *TestConfig, podName, containerName string, cmd
353355
TTY: false,
354356
}, parameterCodec)
355357

358+
// req.URL() contains the request above
356359
exec, err := remotecommand.NewSPDYExecutor(testConfig.RestConfig, "POST", req.URL())
357360
if err != nil {
358361
return "", fmt.Errorf("could not initialize executor: %w", err)
359362
}
360363

364+
// Stream the data using the executor and stream result
361365
var stdout, stderr bytes.Buffer
362366
execErr := exec.StreamWithContext(testConfig.Context, remotecommand.StreamOptions{
363367
Stdout: &stdout,

0 commit comments

Comments
 (0)