Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 1 addition & 24 deletions test/suites/integration/access_log_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ var _ = Describe("Access Log Policy", Ordered, func() {
})

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

It("creation produces an Access Log Subscription for the corresponding VPC Lattice Service when the targetRef's Kind is HTTPRoute", func() {
Skip("This test is unreliable.")
accessLogPolicy := &anv1alpha1.AccessLogPolicy{
ObjectMeta: metav1.ObjectMeta{
Name: k8sResourceName,
Expand All @@ -307,14 +305,9 @@ var _ = Describe("Access Log Policy", Ordered, func() {
alp := &anv1alpha1.AccessLogPolicy{}
err := testFramework.Client.Get(ctx, alpNamespacedName, alp)
g.Expect(err).To(BeNil())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason to remove these asserts?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opted to remove them in favour of the asserts following. The later asserts could not pass if these access log polices were not created anyways.

g.Expect(len(alp.Status.Conditions)).To(BeEquivalentTo(1))
g.Expect(alp.Status.Conditions[0].Type).To(BeEquivalentTo(string(gwv1alpha2.PolicyConditionAccepted)))
g.Expect(alp.Status.Conditions[0].Status).To(BeEquivalentTo(metav1.ConditionTrue))
g.Expect(alp.Status.Conditions[0].ObservedGeneration).To(BeEquivalentTo(1))
g.Expect(alp.Status.Conditions[0].Reason).To(BeEquivalentTo(string(gwv1alpha2.PolicyReasonAccepted)))

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

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

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

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

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

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

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

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

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

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

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

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

It("status is updated when targetRef is deleted and recreated", func() {
Skip("This test is unreliable.")
// Create HTTPRoute, Service, and Deployment
deployment, k8sService := testFramework.NewNginxApp(test.ElasticSearchOptions{
Name: k8sResourceName2,
Expand Down
Loading