Skip to content

Commit e8eebc5

Browse files
author
Ryan Lymburner
authored
Address Access Log Subscription Test Failures (#772)
* Add TLSRoute access log tests * Add clean-up * Address flaky Access Log Subscription tests
1 parent 13e0d1b commit e8eebc5

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

test/suites/integration/access_log_policy_test.go

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ var _ = Describe("Access Log Policy", Ordered, func() {
220220
})
221221

222222
It("creation produces an Access Log Subscription for the corresponding Service Network when the targetRef's Kind is Gateway", func() {
223-
Skip("This test is unreliable.")
224223
accessLogPolicy := &anv1alpha1.AccessLogPolicy{
225224
ObjectMeta: metav1.ObjectMeta{
226225
Name: k8sResourceName,
@@ -280,7 +279,6 @@ var _ = Describe("Access Log Policy", Ordered, func() {
280279
})
281280

282281
It("creation produces an Access Log Subscription for the corresponding VPC Lattice Service when the targetRef's Kind is HTTPRoute", func() {
283-
Skip("This test is unreliable.")
284282
accessLogPolicy := &anv1alpha1.AccessLogPolicy{
285283
ObjectMeta: metav1.ObjectMeta{
286284
Name: k8sResourceName,
@@ -307,14 +305,9 @@ var _ = Describe("Access Log Policy", Ordered, func() {
307305
alp := &anv1alpha1.AccessLogPolicy{}
308306
err := testFramework.Client.Get(ctx, alpNamespacedName, alp)
309307
g.Expect(err).To(BeNil())
310-
g.Expect(len(alp.Status.Conditions)).To(BeEquivalentTo(1))
311-
g.Expect(alp.Status.Conditions[0].Type).To(BeEquivalentTo(string(gwv1alpha2.PolicyConditionAccepted)))
312-
g.Expect(alp.Status.Conditions[0].Status).To(BeEquivalentTo(metav1.ConditionTrue))
313-
g.Expect(alp.Status.Conditions[0].ObservedGeneration).To(BeEquivalentTo(1))
314-
g.Expect(alp.Status.Conditions[0].Reason).To(BeEquivalentTo(string(gwv1alpha2.PolicyReasonAccepted)))
315308

316309
// VPC Lattice Service should have Access Log Subscription with S3 Bucket destination
317-
latticeService := testFramework.GetVpcLatticeService(ctx, core.NewHTTPRoute(gwv1.HTTPRoute(*httpRoute)))
310+
latticeService := testFramework.GetVpcLatticeService(ctx, core.NewHTTPRoute(*httpRoute))
318311
listALSInput := &vpclattice.ListAccessLogSubscriptionsInput{
319312
ResourceIdentifier: latticeService.Arn,
320313
}
@@ -341,7 +334,6 @@ var _ = Describe("Access Log Policy", Ordered, func() {
341334
})
342335

343336
It("creation produces an Access Log Subscription for the corresponding VPC Lattice Service when the targetRef's Kind is GRPCRoute", func() {
344-
Skip("This test is unreliable.")
345337
accessLogPolicy := &anv1alpha1.AccessLogPolicy{
346338
ObjectMeta: metav1.ObjectMeta{
347339
Name: k8sResourceName,
@@ -368,11 +360,6 @@ var _ = Describe("Access Log Policy", Ordered, func() {
368360
alp := &anv1alpha1.AccessLogPolicy{}
369361
err := testFramework.Client.Get(ctx, alpNamespacedName, alp)
370362
g.Expect(err).To(BeNil())
371-
g.Expect(len(alp.Status.Conditions)).To(BeEquivalentTo(1))
372-
g.Expect(alp.Status.Conditions[0].Type).To(BeEquivalentTo(string(gwv1alpha2.PolicyConditionAccepted)))
373-
g.Expect(alp.Status.Conditions[0].Status).To(BeEquivalentTo(metav1.ConditionTrue))
374-
g.Expect(alp.Status.Conditions[0].ObservedGeneration).To(BeEquivalentTo(1))
375-
g.Expect(alp.Status.Conditions[0].Reason).To(BeEquivalentTo(string(gwv1alpha2.PolicyReasonAccepted)))
376363

377364
// VPC Lattice Service should have Access Log Subscription with S3 Bucket destination
378365
latticeService := testFramework.GetVpcLatticeService(ctx, core.NewGRPCRoute(*grpcRoute))
@@ -402,7 +389,6 @@ var _ = Describe("Access Log Policy", Ordered, func() {
402389
})
403390

404391
It("creation produces Access Log Subscriptions with Bucket, Log Group, and Delivery Stream destinations on the same targetRef", func() {
405-
Skip("This test is unreliable.")
406392
// Create Access Log Policy for S3 Bucket
407393
s3AccessLogPolicy := &anv1alpha1.AccessLogPolicy{
408394
ObjectMeta: metav1.ObjectMeta{
@@ -492,7 +478,6 @@ var _ = Describe("Access Log Policy", Ordered, func() {
492478
})
493479

494480
It("creation sets Access Log Policy status to Conflicted when creating a new policy for the same targetRef and destination type", func() {
495-
Skip("This test is unreliable.")
496481
accessLogPolicy1 := &anv1alpha1.AccessLogPolicy{
497482
ObjectMeta: metav1.ObjectMeta{
498483
Name: k8sResourceName + "-1",
@@ -545,7 +530,6 @@ var _ = Describe("Access Log Policy", Ordered, func() {
545530
})
546531

547532
It("creation sets Access Log Policy status to Invalid when the destination does not exist", func() {
548-
Skip("This test is unreliable.")
549533
accessLogPolicy := &anv1alpha1.AccessLogPolicy{
550534
ObjectMeta: metav1.ObjectMeta{
551535
Name: k8sResourceName,
@@ -581,7 +565,6 @@ var _ = Describe("Access Log Policy", Ordered, func() {
581565
})
582566

583567
It("creation sets Access Log Policy status to Invalid when the targetRef's Group is not gateway.networking.k8s.io", func() {
584-
Skip("This test is unreliable.")
585568
accessLogPolicy := &anv1alpha1.AccessLogPolicy{
586569
ObjectMeta: metav1.ObjectMeta{
587570
Name: k8sResourceName,
@@ -617,7 +600,6 @@ var _ = Describe("Access Log Policy", Ordered, func() {
617600
})
618601

619602
It("creation sets Access Log Policy status to Invalid when the targetRef's Kind is not Gateway, HTTPRoute, or GRPCRoute", func() {
620-
Skip("This test is unreliable.")
621603
accessLogPolicy := &anv1alpha1.AccessLogPolicy{
622604
ObjectMeta: metav1.ObjectMeta{
623605
Name: k8sResourceName,
@@ -653,7 +635,6 @@ var _ = Describe("Access Log Policy", Ordered, func() {
653635
})
654636

655637
It("update properly changes or replaces Access Log Subscription and sets Access Log Policy status", func() {
656-
Skip("This test is unreliable.")
657638
originalAlsArn := ""
658639
currentAlsArn := ""
659640
expectedGeneration := 1
@@ -1040,7 +1021,6 @@ var _ = Describe("Access Log Policy", Ordered, func() {
10401021
})
10411022

10421023
It("deletion removes the Access Log Subscription for the corresponding Service Network when the targetRef's Kind is Gateway", func() {
1043-
Skip("This test is unreliable.")
10441024
accessLogPolicy := &anv1alpha1.AccessLogPolicy{
10451025
ObjectMeta: metav1.ObjectMeta{
10461026
Name: k8sResourceName,
@@ -1083,7 +1063,6 @@ var _ = Describe("Access Log Policy", Ordered, func() {
10831063
})
10841064

10851065
It("deletion removes the Access Log Subscription for the corresponding VPC Lattice Service when the targetRef's Kind is HTTPRoute", func() {
1086-
Skip("This test is unreliable.")
10871066
accessLogPolicy := &anv1alpha1.AccessLogPolicy{
10881067
ObjectMeta: metav1.ObjectMeta{
10891068
Name: k8sResourceName,
@@ -1128,7 +1107,6 @@ var _ = Describe("Access Log Policy", Ordered, func() {
11281107
})
11291108

11301109
It("deletion removes the Access Log Subscription for the corresponding VPC Lattice Service when the targetRef's Kind is GRPCRoute", func() {
1131-
Skip("This test is unreliable.")
11321110
accessLogPolicy := &anv1alpha1.AccessLogPolicy{
11331111
ObjectMeta: metav1.ObjectMeta{
11341112
Name: k8sResourceName,
@@ -1173,7 +1151,6 @@ var _ = Describe("Access Log Policy", Ordered, func() {
11731151
})
11741152

11751153
It("status is updated when targetRef is deleted and recreated", func() {
1176-
Skip("This test is unreliable.")
11771154
// Create HTTPRoute, Service, and Deployment
11781155
deployment, k8sService := testFramework.NewNginxApp(test.ElasticSearchOptions{
11791156
Name: k8sResourceName2,

0 commit comments

Comments
 (0)