|
1 |
| -//go:build e2e |
2 |
| - |
3 | 1 | package basic
|
4 | 2 |
|
5 | 3 | import (
|
@@ -37,7 +35,7 @@ func (bt *FlowCaptureTester) DoTest(t *testing.T, isIPFIX bool) {
|
37 | 35 | return ctx
|
38 | 36 | },
|
39 | 37 | ).Assess("correctness of client -> server (as Service) request flows",
|
40 |
| - func(ctx context.Context, t *testing.T, cfg *envconf.Config) context.Context { |
| 38 | + func(ctx context.Context, t *testing.T, _ *envconf.Config) context.Context { |
41 | 39 | lq := bt.lokiQuery(t,
|
42 | 40 | `{DstK8S_OwnerName="server",SrcK8S_OwnerName="client"}`+
|
43 | 41 | `|="\"DstAddr\":\"`+pci.serverServiceIP+`\""`)
|
@@ -82,7 +80,7 @@ func (bt *FlowCaptureTester) DoTest(t *testing.T, isIPFIX bool) {
|
82 | 80 | return ctx
|
83 | 81 | },
|
84 | 82 | ).Assess("correctness of client -> server (as Pod) request flows",
|
85 |
| - func(ctx context.Context, t *testing.T, cfg *envconf.Config) context.Context { |
| 83 | + func(ctx context.Context, t *testing.T, _ *envconf.Config) context.Context { |
86 | 84 | lq := bt.lokiQuery(t,
|
87 | 85 | `{DstK8S_OwnerName="server",SrcK8S_OwnerName="client"}`+
|
88 | 86 | `|="\"DstAddr\":\"`+pci.serverPodIP+`\""`)
|
@@ -124,7 +122,7 @@ func (bt *FlowCaptureTester) DoTest(t *testing.T, isIPFIX bool) {
|
124 | 122 | return ctx
|
125 | 123 | },
|
126 | 124 | ).Assess("correctness of server (from Service) -> client response flows",
|
127 |
| - func(ctx context.Context, t *testing.T, cfg *envconf.Config) context.Context { |
| 125 | + func(ctx context.Context, t *testing.T, _ *envconf.Config) context.Context { |
128 | 126 | lq := bt.lokiQuery(t,
|
129 | 127 | `{DstK8S_OwnerName="client",SrcK8S_OwnerName="server"}`+
|
130 | 128 | `|="\"SrcAddr\":\"`+pci.serverServiceIP+`\""`)
|
@@ -167,7 +165,7 @@ func (bt *FlowCaptureTester) DoTest(t *testing.T, isIPFIX bool) {
|
167 | 165 | return ctx
|
168 | 166 | },
|
169 | 167 | ).Assess("correctness of server (from Pod) -> client response flows",
|
170 |
| - func(ctx context.Context, t *testing.T, cfg *envconf.Config) context.Context { |
| 168 | + func(ctx context.Context, t *testing.T, _ *envconf.Config) context.Context { |
171 | 169 | lq := bt.lokiQuery(t,
|
172 | 170 | `{DstK8S_OwnerName="client",SrcK8S_OwnerName="server"}`+
|
173 | 171 | `|="\"SrcAddr\":\"`+pci.serverPodIP+`\""`)
|
@@ -282,6 +280,7 @@ func (bt *FlowCaptureTester) lokiQuery(t *testing.T, logQL string) tester.LokiQu
|
282 | 280 | query, err = bt.Cluster.Loki().Query(1, logQL)
|
283 | 281 | require.NoError(t, err)
|
284 | 282 | require.NotNil(t, query)
|
| 283 | + require.NotNil(t, query.Data) |
285 | 284 | require.NotEmpty(t, query.Data.Result)
|
286 | 285 | }, test.Interval(time.Second))
|
287 | 286 | result := query.Data.Result[0]
|
|
0 commit comments