Skip to content

Commit e7fa7d8

Browse files
committed
address feedback
1 parent fe3aea4 commit e7fa7d8

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

test/integration/lrp/lrp_fqdn_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ var (
2020
// FQDN Cilium Network Policy. As such, enable-l7-proxy should be enabled in the config
2121
// The test assumes the current kubeconfig points to a cluster with cilium, cns,
2222
// and kube-dns already installed. The lrp feature flag should also be enabled in the cilium config
23+
// Does not check if cluster is in a stable state
2324
// Resources created are automatically cleaned up
2425
// From the lrp folder, run: go test ./ -v -tags "lrp" -run ^TestLRPFQDN$
2526
func TestLRPFQDN(t *testing.T) {

test/integration/lrp/lrp_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
"github.com/pkg/errors"
1818
"github.com/stretchr/testify/require"
1919
"golang.org/x/exp/rand"
20-
v1 "k8s.io/api/core/v1"
20+
corev1 "k8s.io/api/core/v1"
2121
)
2222

2323
const (
@@ -47,7 +47,7 @@ var (
4747
clientPath = ciliumManifestsDir + "client-ds.yaml"
4848
)
4949

50-
func setupLRP(t *testing.T, ctx context.Context) (*v1.Pod, func()) {
50+
func setupLRP(t *testing.T, ctx context.Context) (*corev1.Pod, func()) {
5151
var cleanUpFns []func()
5252
success := false
5353
cleanupFn := func() {
@@ -153,7 +153,7 @@ func setupLRP(t *testing.T, ctx context.Context) (*v1.Pod, func()) {
153153
return &selectedClientPod, cleanupFn
154154
}
155155

156-
func testLRPCase(t *testing.T, ctx context.Context, clientPod v1.Pod, clientCmd []string, expectResponse, expectErrMsg string, countShouldIncrease bool) {
156+
func testLRPCase(t *testing.T, ctx context.Context, clientPod corev1.Pod, clientCmd []string, expectResponse, expectErrMsg string, countShouldIncrease bool) {
157157
config := kubernetes.MustGetRestConfig()
158158
cs := kubernetes.MustGetClientset()
159159

@@ -179,11 +179,10 @@ func testLRPCase(t *testing.T, ctx context.Context, clientPod v1.Pod, clientCmd
179179
// in case there is time to propagate
180180
time.Sleep(500 * time.Millisecond)
181181

182-
// curl again and see count increases
182+
// curl again and see count diff
183183
afterMetric, err := prometheus.GetMetric(promAddress, coreDNSRequestCountTotal, metricLabels)
184184
require.NoError(t, err)
185185

186-
// count should go up
187186
if countShouldIncrease {
188187
require.Greater(t, afterMetric.GetCounter().GetValue(), beforeMetric.GetCounter().GetValue(), "dns metric count did not increase after command")
189188
} else {
@@ -194,6 +193,7 @@ func testLRPCase(t *testing.T, ctx context.Context, clientPod v1.Pod, clientCmd
194193
// TestLRP tests if the local redirect policy in a cilium cluster is functioning
195194
// The test assumes the current kubeconfig points to a cluster with cilium (1.16+), cns,
196195
// and kube-dns already installed. The lrp feature flag should be enabled in the cilium config
196+
// Does not check if cluster is in a stable state
197197
// Resources created are automatically cleaned up
198198
// From the lrp folder, run: go test ./ -v -tags "lrp" -run ^TestLRP$
199199
func TestLRP(t *testing.T) {

0 commit comments

Comments
 (0)