@@ -33,7 +33,7 @@ var disruptionClient = &http.Client{Timeout: 10 * time.Second}
3333
3434// sendRawCompletion sends a completion request and returns the HTTP status code.
3535func sendRawCompletion () (int , error ) {
36- body := fmt .Sprintf (`{"model":"%s","prompt":"%s","max_tokens":10}` , simModelName , simplePrompt )
36+ body := fmt .Sprintf (`{"model":"%s","prompt":"%s","max_tokens":10}` , testutils . ModelName , simplePrompt )
3737 req , err := http .NewRequest (http .MethodPost , fmt .Sprintf ("http://localhost:%s/v1/completions" , port ), strings .NewReader (body ))
3838 if err != nil {
3939 return 0 , err
@@ -99,7 +99,7 @@ var _ = ginkgo.Describe("Disruption tests", ginkgo.Ordered, ginkgo.Label("Disrup
9999 gomega .Expect (decodePods ).Should (gomega .HaveLen (2 ))
100100
101101 ginkgo .By ("Verifying requests route successfully before disruption" )
102- nsHdr , _ , _ := runCompletion (simplePrompt , simModelName )
102+ nsHdr , _ , _ := runCompletion (simplePrompt , testutils . ModelName )
103103 gomega .Expect (nsHdr ).Should (gomega .Equal (nsName ))
104104
105105 targetPod := decodePods [0 ]
@@ -112,7 +112,7 @@ var _ = ginkgo.Describe("Disruption tests", ginkgo.Ordered, ginkgo.Label("Disrup
112112
113113 ginkgo .By ("Verifying new requests eventually route to a pod other than the killed one" )
114114 gomega .Eventually (func () error {
115- nsHdr , podHdr , _ , err := tryCompletion (simplePrompt , simModelName )
115+ nsHdr , podHdr , _ , err := tryCompletion (simplePrompt , testutils . ModelName )
116116 if err != nil {
117117 return err
118118 }
@@ -133,7 +133,7 @@ var _ = ginkgo.Describe("Disruption tests", ginkgo.Ordered, ginkgo.Label("Disrup
133133
134134 ginkgo .By ("Verifying requests succeed after recovery" )
135135 for range 3 {
136- nsHdr , _ , _ = runCompletion (simplePrompt , simModelName )
136+ nsHdr , _ , _ = runCompletion (simplePrompt , testutils . ModelName )
137137 gomega .Expect (nsHdr ).Should (gomega .Equal (nsName ))
138138 }
139139 })
@@ -185,7 +185,7 @@ var _ = ginkgo.Describe("Disruption tests", ginkgo.Ordered, ginkgo.Label("Disrup
185185
186186 ginkgo .By ("Verifying requests succeed after recovery" )
187187 for range 3 {
188- nsHdr , _ , _ := runCompletion (simplePrompt , simModelName )
188+ nsHdr , _ , _ := runCompletion (simplePrompt , testutils . ModelName )
189189 gomega .Expect (nsHdr ).Should (gomega .Equal (nsName ))
190190 }
191191 })
@@ -205,7 +205,7 @@ var _ = ginkgo.Describe("Disruption tests", ginkgo.Ordered, ginkgo.Label("Disrup
205205 gomega .Expect (decodePods ).Should (gomega .HaveLen (1 ))
206206
207207 ginkgo .By ("Verifying requests succeed before disruption" )
208- nsHdr , _ , _ := runCompletion (simplePrompt , simModelName )
208+ nsHdr , _ , _ := runCompletion (simplePrompt , testutils . ModelName )
209209 gomega .Expect (nsHdr ).Should (gomega .Equal (nsName ))
210210
211211 ginkgo .By ("Scaling deployment to zero" )
@@ -231,7 +231,7 @@ var _ = ginkgo.Describe("Disruption tests", ginkgo.Ordered, ginkgo.Label("Disrup
231231
232232 ginkgo .By ("Verifying requests succeed after recovery" )
233233 gomega .Eventually (func () string {
234- nsHdr , _ , _ := runCompletion (simplePrompt , simModelName )
234+ nsHdr , _ , _ := runCompletion (simplePrompt , testutils . ModelName )
235235 return nsHdr
236236 }, eppRecoveryTimeout , 2 * time .Second ).Should (gomega .Equal (nsName ))
237237 })
@@ -248,7 +248,7 @@ var _ = ginkgo.Describe("Disruption tests", ginkgo.Ordered, ginkgo.Label("Disrup
248248 ginkgo .DeferCleanup (testutils .DeleteObjects , testConfig , epp )
249249
250250 ginkgo .By ("Verifying requests succeed before EPP disruption" )
251- nsHdr , _ , _ := runCompletion (simplePrompt , simModelName )
251+ nsHdr , _ , _ := runCompletion (simplePrompt , testutils . ModelName )
252252 gomega .Expect (nsHdr ).Should (gomega .Equal (nsName ))
253253
254254 ginkgo .By ("Finding EPP pod" )
@@ -297,7 +297,7 @@ var _ = ginkgo.Describe("Disruption tests", ginkgo.Ordered, ginkgo.Label("Disrup
297297 ginkgo .DeferCleanup (testutils .DeleteObjects , testConfig , epp )
298298
299299 ginkgo .By ("Verifying requests succeed before disruption" )
300- nsHdr , _ , _ := runCompletion (simplePrompt , simModelName )
300+ nsHdr , _ , _ := runCompletion (simplePrompt , testutils . ModelName )
301301 gomega .Expect (nsHdr ).Should (gomega .Equal (nsName ))
302302
303303 ginkgo .By ("Starting background traffic" )
@@ -341,7 +341,7 @@ var _ = ginkgo.Describe("Disruption tests", ginkgo.Ordered, ginkgo.Label("Disrup
341341
342342func sendStreamingCompletion (connected chan <- string ) error {
343343 longPrompt := strings .Repeat ("This is a longer prompt to keep the stream open. " , 20 )
344- body := fmt .Sprintf (`{"model":"%s","prompt":"%s","max_tokens":100,"stream":true}` , simModelName , longPrompt )
344+ body := fmt .Sprintf (`{"model":"%s","prompt":"%s","max_tokens":100,"stream":true}` , testutils . ModelName , longPrompt )
345345 req , err := http .NewRequest (http .MethodPost , fmt .Sprintf ("http://localhost:%s/v1/completions" , port ), strings .NewReader (body ))
346346 if err != nil {
347347 connected <- ""
0 commit comments