Skip to content

Commit 563b35d

Browse files
committed
fix tests
1 parent edd86dc commit 563b35d

File tree

2 files changed

+2
-24
lines changed

2 files changed

+2
-24
lines changed

test/e2e/gatewayapi/httproute.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,19 +153,17 @@ spec:
153153
ResourceApplied("HTTPRoute", "httpbin", exactRouteByGet, 1)
154154

155155
By("access dataplane to check the HTTPRoute")
156-
// time.Sleep(1000000 * time.Second)
157-
s.NewAPISIXClientWithHTTPS().
156+
s.NewAPISIXHttpsClient("api6.com").
158157
GET("/get").
159158
WithHost("api6.com").
160159
Expect().
161160
Status(200)
162-
// time.Sleep(1000 * time.Second)
163161
By("delete HTTPRoute")
164162
err := s.DeleteResourceFromString(exactRouteByGet)
165163
Expect(err).NotTo(HaveOccurred(), "deleting HTTPRoute")
166164
time.Sleep(5 * time.Second)
167165

168-
s.NewAPISIXClientWithHTTPS().
166+
s.NewAPISIXHttpsClient("api6.com").
169167
GET("/get").
170168
WithHost("api6.com").
171169
Expect().

test/e2e/scaffold/scaffold.go

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -214,26 +214,6 @@ func (s *Scaffold) NewAPISIXClient() *httpexpect.Expect {
214214
})
215215
}
216216

217-
// NewAPISIXClient creates the default HTTP client.
218-
func (s *Scaffold) NewAPISIXClientWithHTTPS() *httpexpect.Expect {
219-
u := url.URL{
220-
Scheme: "https",
221-
Host: s.apisixHttpsTunnel.Endpoint(),
222-
}
223-
return httpexpect.WithConfig(httpexpect.Config{
224-
BaseURL: u.String(),
225-
Client: &http.Client{
226-
Transport: &http.Transport{},
227-
CheckRedirect: func(req *http.Request, via []*http.Request) error {
228-
return http.ErrUseLastResponse
229-
},
230-
},
231-
Reporter: httpexpect.NewAssertReporter(
232-
httpexpect.NewAssertReporter(GinkgoT()),
233-
),
234-
})
235-
}
236-
237217
// GetAPISIXHTTPSEndpoint get apisix https endpoint from tunnel map
238218
func (s *Scaffold) GetAPISIXHTTPSEndpoint() string {
239219
return s.apisixHttpsTunnel.Endpoint()

0 commit comments

Comments
 (0)