Skip to content

Commit a326ea4

Browse files
committed
update
Signed-off-by: bitliu <[email protected]>
1 parent 4396721 commit a326ea4

File tree

6 files changed

+390
-35
lines changed

6 files changed

+390
-35
lines changed

.github/workflows/integration-test-ai-gateway.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ jobs:
6767
make e2e-test PROFILE=ai-gateway
6868
env:
6969
E2E_VERBOSE: "true"
70+
KEEP_CLUSTER: "true"
7071

7172
- name: Show cluster logs on failure
7273
if: failure()

e2e/go.mod

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,16 @@ require (
2121
github.com/google/go-cmp v0.6.0 // indirect
2222
github.com/google/gofuzz v1.2.0 // indirect
2323
github.com/google/uuid v1.6.0 // indirect
24+
github.com/gorilla/websocket v1.5.0 // indirect
2425
github.com/imdario/mergo v0.3.16 // indirect
2526
github.com/josharian/intern v1.0.0 // indirect
2627
github.com/json-iterator/go v1.1.12 // indirect
2728
github.com/mailru/easyjson v0.7.7 // indirect
29+
github.com/moby/spdystream v0.4.0 // indirect
2830
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
2931
github.com/modern-go/reflect2 v1.0.2 // indirect
3032
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
33+
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
3134
github.com/spf13/pflag v1.0.5 // indirect
3235
github.com/x448/float16 v0.8.4 // indirect
3336
golang.org/x/net v0.26.0 // indirect

e2e/go.sum

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
2+
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
13
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
24
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
35
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -34,6 +36,8 @@ github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af h1:kmjWCqn2qkEml422C2
3436
github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo=
3537
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
3638
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
39+
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
40+
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
3741
github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4=
3842
github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY=
3943
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
@@ -51,13 +55,17 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
5155
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
5256
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
5357
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
58+
github.com/moby/spdystream v0.4.0 h1:Vy79D6mHeJJjiPdFEL2yku1kl0chZpJfZcPpb16BRl8=
59+
github.com/moby/spdystream v0.4.0/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI=
5460
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
5561
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
5662
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
5763
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
5864
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
5965
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
6066
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
67+
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus=
68+
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
6169
github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA=
6270
github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To=
6371
github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw=

e2e/pkg/framework/runner.go

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"time"
99

1010
"k8s.io/client-go/kubernetes"
11+
"k8s.io/client-go/rest"
1112
"k8s.io/client-go/tools/clientcmd"
1213

1314
"github.com/vllm-project/semantic-router/e2e/pkg/cluster"
@@ -17,10 +18,11 @@ import (
1718

1819
// Runner orchestrates the E2E test execution
1920
type Runner struct {
20-
opts *TestOptions
21-
profile Profile
22-
cluster *cluster.KindCluster
23-
builder *docker.Builder
21+
opts *TestOptions
22+
profile Profile
23+
cluster *cluster.KindCluster
24+
builder *docker.Builder
25+
restConfig *rest.Config
2426
}
2527

2628
// NewRunner creates a new test runner
@@ -65,6 +67,9 @@ func (r *Runner) Run(ctx context.Context) error {
6567
return fmt.Errorf("failed to build kubeconfig: %w", err)
6668
}
6769

70+
// Store rest config for test cases
71+
r.restConfig = config
72+
6873
kubeClient, err := kubernetes.NewForConfig(config)
6974
if err != nil {
7075
return fmt.Errorf("failed to create Kubernetes client: %w", err)
@@ -195,9 +200,10 @@ func (r *Runner) runSingleTest(ctx context.Context, kubeClient *kubernetes.Clien
195200
start := time.Now()
196201

197202
opts := testcases.TestCaseOptions{
198-
Verbose: r.opts.Verbose,
199-
Namespace: "default",
200-
Timeout: "5m",
203+
Verbose: r.opts.Verbose,
204+
Namespace: "default",
205+
Timeout: "5m",
206+
RestConfig: r.restConfig,
201207
}
202208

203209
err := tc.Fn(ctx, kubeClient, opts)

e2e/pkg/testcases/registry.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"sync"
77

88
"k8s.io/client-go/kubernetes"
9+
"k8s.io/client-go/rest"
910
)
1011

1112
// TestCase represents a single test case
@@ -36,6 +37,9 @@ type TestCaseOptions struct {
3637

3738
// Timeout is the test timeout duration
3839
Timeout string
40+
41+
// RestConfig is the Kubernetes REST config
42+
RestConfig *rest.Config
3943
}
4044

4145
var (

0 commit comments

Comments
 (0)