Skip to content

Commit 5e68b7e

Browse files
drigzjohanbrandhorst
authored andcommitted
Use 8088 instead of 8080 in integration test.
This should avoid a failure on Bazel's Buildkite CI, where 8080 cannot be used.
1 parent d825bf0 commit 5e68b7e

File tree

3 files changed

+36
-36
lines changed

3 files changed

+36
-36
lines changed

examples/internal/integration/client_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func TestEchoClient(t *testing.T) {
1616
}
1717

1818
cfg := echo.NewConfiguration()
19-
cfg.BasePath = "http://localhost:8080"
19+
cfg.BasePath = "http://localhost:8088"
2020

2121
cl := echo.NewAPIClient(cfg)
2222
resp, _, err := cl.EchoServiceApi.Echo(context.Background(), "foo")
@@ -35,7 +35,7 @@ func TestEchoBodyClient(t *testing.T) {
3535
}
3636

3737
cfg := echo.NewConfiguration()
38-
cfg.BasePath = "http://localhost:8080"
38+
cfg.BasePath = "http://localhost:8088"
3939

4040
cl := echo.NewAPIClient(cfg)
4141
req := echo.ExamplepbSimpleMessage{Id: "foo"}
@@ -55,7 +55,7 @@ func TestAbitOfEverythingClient(t *testing.T) {
5555
}
5656

5757
cfg := abe.NewConfiguration()
58-
cfg.BasePath = "http://localhost:8080"
58+
cfg.BasePath = "http://localhost:8088"
5959

6060
cl := abe.NewAPIClient(cfg)
6161

@@ -184,7 +184,7 @@ func TestUnannotatedEchoClient(t *testing.T) {
184184
}
185185

186186
cfg := unannotatedecho.NewConfiguration()
187-
cfg.BasePath = "http://localhost:8080"
187+
cfg.BasePath = "http://localhost:8088"
188188

189189
cl := unannotatedecho.NewAPIClient(cfg)
190190

@@ -204,7 +204,7 @@ func TestUnannotatedEchoBodyClient(t *testing.T) {
204204
}
205205

206206
cfg := unannotatedecho.NewConfiguration()
207-
cfg.BasePath = "http://localhost:8080"
207+
cfg.BasePath = "http://localhost:8088"
208208

209209
cl := unannotatedecho.NewAPIClient(cfg)
210210

examples/internal/integration/integration_test.go

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ func TestEcho(t *testing.T) {
4040
return
4141
}
4242

43-
testEcho(t, 8080, "application/json")
44-
testEchoOneof(t, 8080, "application/json")
45-
testEchoOneof1(t, 8080, "application/json")
46-
testEchoOneof2(t, 8080, "application/json")
47-
testEchoBody(t, 8080)
43+
testEcho(t, 8088, "application/json")
44+
testEchoOneof(t, 8088, "application/json")
45+
testEchoOneof1(t, 8088, "application/json")
46+
testEchoOneof2(t, 8088, "application/json")
47+
testEchoBody(t, 8088)
4848
}
4949

5050
func TestForwardResponseOption(t *testing.T) {
@@ -266,17 +266,17 @@ func TestABE(t *testing.T) {
266266
return
267267
}
268268

269-
testABECreate(t, 8080)
270-
testABECreateBody(t, 8080)
271-
testABEBulkCreate(t, 8080)
272-
testABEBulkCreateWithError(t, 8080)
273-
testABELookup(t, 8080)
274-
testABELookupNotFound(t, 8080)
275-
testABEList(t, 8080)
276-
testABEBulkEcho(t, 8080)
277-
testABEBulkEchoZeroLength(t, 8080)
278-
testAdditionalBindings(t, 8080)
279-
testABERepeated(t, 8080)
269+
testABECreate(t, 8088)
270+
testABECreateBody(t, 8088)
271+
testABEBulkCreate(t, 8088)
272+
testABEBulkCreateWithError(t, 8088)
273+
testABELookup(t, 8088)
274+
testABELookupNotFound(t, 8088)
275+
testABEList(t, 8088)
276+
testABEBulkEcho(t, 8088)
277+
testABEBulkEchoZeroLength(t, 8088)
278+
testAdditionalBindings(t, 8088)
279+
testABERepeated(t, 8088)
280280
}
281281

282282
func testABECreate(t *testing.T, port int) {
@@ -680,7 +680,7 @@ func TestABEPatch(t *testing.T) {
680680
return
681681
}
682682

683-
port := 8080
683+
port := 8088
684684

685685
// create a record with a known string_value and int32_value
686686
uuid := postABE(t, port, gw.ABitOfEverything{StringValue: "strprefix/bar", Int32Value: 32})
@@ -724,7 +724,7 @@ func TestABEPatchBody(t *testing.T) {
724724
return
725725
}
726726

727-
port := 8080
727+
port := 8088
728728

729729
for _, tc := range []struct {
730730
name string
@@ -1284,7 +1284,7 @@ func TestTimeout(t *testing.T) {
12841284
return
12851285
}
12861286

1287-
apiURL := "http://localhost:8080/v2/example/timeout"
1287+
apiURL := "http://localhost:8088/v2/example/timeout"
12881288
req, err := http.NewRequest("GET", apiURL, nil)
12891289
if err != nil {
12901290
t.Errorf(`http.NewRequest("GET", %q, nil) failed with %v; want success`, apiURL, err)
@@ -1309,7 +1309,7 @@ func TestErrorWithDetails(t *testing.T) {
13091309
return
13101310
}
13111311

1312-
apiURL := "http://localhost:8080/v2/example/errorwithdetails"
1312+
apiURL := "http://localhost:8088/v2/example/errorwithdetails"
13131313
resp, err := http.Get(apiURL)
13141314
if err != nil {
13151315
t.Errorf("http.Get(%q) failed with %v; want success", apiURL, err)
@@ -1374,7 +1374,7 @@ func TestPostWithEmptyBody(t *testing.T) {
13741374
return
13751375
}
13761376

1377-
apiURL := "http://localhost:8080/v2/example/postwithemptybody/name"
1377+
apiURL := "http://localhost:8088/v2/example/postwithemptybody/name"
13781378
rep, err := http.Post(apiURL, "application/json", nil)
13791379

13801380
if err != nil {
@@ -1395,7 +1395,7 @@ func TestUnknownPath(t *testing.T) {
13951395
return
13961396
}
13971397

1398-
apiURL := "http://localhost:8080"
1398+
apiURL := "http://localhost:8088"
13991399
resp, err := http.Post(apiURL, "application/json", strings.NewReader("{}"))
14001400
if err != nil {
14011401
t.Errorf("http.Post(%q) failed with %v; want success", apiURL, err)
@@ -1420,7 +1420,7 @@ func TestMethodNotAllowed(t *testing.T) {
14201420
return
14211421
}
14221422

1423-
apiURL := "http://localhost:8080/v1/example/echo/myid"
1423+
apiURL := "http://localhost:8088/v1/example/echo/myid"
14241424
resp, err := http.Get(apiURL)
14251425
if err != nil {
14261426
t.Errorf("http.Post(%q) failed with %v; want success", apiURL, err)
@@ -1445,7 +1445,7 @@ func TestInvalidArgument(t *testing.T) {
14451445
return
14461446
}
14471447

1448-
apiURL := "http://localhost:8080/v1/example/echo/myid/not_int64"
1448+
apiURL := "http://localhost:8088/v1/example/echo/myid/not_int64"
14491449
resp, err := http.Get(apiURL)
14501450
if err != nil {
14511451
t.Errorf("http.Get(%q) failed with %v; want success", apiURL, err)
@@ -1470,9 +1470,9 @@ func TestResponseBody(t *testing.T) {
14701470
return
14711471
}
14721472

1473-
testResponseBody(t, 8080)
1474-
testResponseBodies(t, 8080)
1475-
testResponseStrings(t, 8080)
1473+
testResponseBody(t, 8088)
1474+
testResponseBodies(t, 8088)
1475+
testResponseStrings(t, 8088)
14761476
}
14771477

14781478
func testResponseBody(t *testing.T, port int) {
@@ -1594,7 +1594,7 @@ func TestRequestQueryParams(t *testing.T) {
15941594
return
15951595
}
15961596

1597-
port := 8080
1597+
port := 8088
15981598

15991599
formValues := url.Values{}
16001600
formValues.Set("string_value", "hello-world")

examples/internal/integration/main_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func runServers(ctx context.Context) <-chan error {
6464
}
6565
}()
6666
go func() {
67-
if err := runGateway(ctx, ":8080"); err != nil {
67+
if err := runGateway(ctx, ":8088"); err != nil {
6868
ch <- fmt.Errorf("cannot run gateway service: %v", err)
6969
}
7070
}()
@@ -81,8 +81,8 @@ func TestMain(m *testing.M) {
8181

8282
ch := make(chan int, 1)
8383
go func() {
84-
if err := waitForGateway(ctx, 8080); err != nil {
85-
glog.Errorf("waitForGateway(ctx, 8080) failed with %v; want success", err)
84+
if err := waitForGateway(ctx, 8088); err != nil {
85+
glog.Errorf("waitForGateway(ctx, 8088) failed with %v; want success", err)
8686
}
8787
ch <- m.Run()
8888
}()

0 commit comments

Comments
 (0)