...
1
16
17 package tests
18
19 import (
20 "testing"
21
22 "sigs.k8s.io/gateway-api/conformance/utils/echo"
23 "sigs.k8s.io/gateway-api/conformance/utils/http"
24 "sigs.k8s.io/gateway-api/conformance/utils/suite"
25 )
26
27 func init() {
28 ConformanceTests = append(ConformanceTests, MeshBasic)
29 }
30
31 var MeshBasic = suite.ConformanceTest{
32 ShortName: "MeshBasic",
33 Description: "A mesh client can communicate with a mesh server. This tests basic reachability with no configuration applied.",
34 Features: []suite.SupportedFeature{
35 suite.SupportMesh,
36 },
37 Manifests: []string{},
38 Test: func(t *testing.T, s *suite.ConformanceTestSuite) {
39 client := echo.ConnectToApp(t, s, echo.MeshAppEchoV1)
40 cases := []http.ExpectedResponse{{
41 Request: http.Request{
42 Host: "echo",
43 Method: "GET",
44 },
45 Response: http.Response{
46 StatusCode: 200,
47 },
48 }}
49 for i := range cases {
50
51
52 tc := cases[i]
53 t.Run(tc.GetTestCaseName(i), func(t *testing.T) {
54 client.MakeRequestAndExpectEventuallyConsistentResponse(t, tc, s.TimeoutConfig)
55 })
56 }
57 },
58 }
59
View as plain text