Skip to content
Open
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
24 changes: 11 additions & 13 deletions test/e2e/suite/addons/addons_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -449,23 +449,21 @@ var _ = Describe("Hybrid Nodes", func() {
_, err := addonEc2Test.NewFsxCSIDriverTest(ctx)
Expect(err).To(Succeed(), "should have created FSx CSI driver test")

// Comment out the below code when the add-on is available publicly on aws console

// fsxCSITest, err := addonEc2Test.NewFsxCSIDriverTest(ctx)
fsxCSITest, err := addonEc2Test.NewFsxCSIDriverTest(ctx)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks NewFsxCSIDriverTest called twice.


// Expect(err).To(Succeed(), "should have created FSx CSI driver test")
Expect(err).To(Succeed(), "should have created FSx CSI driver test")

// DeferCleanup(func(ctx context.Context) {
// Expect(fsxCSITest.Delete(ctx)).To(Succeed(), "should cleanup FSx CSI driver successfully")
// })
DeferCleanup(func(ctx context.Context) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit - ctx variable is looks reuse and can shadow the outer ctx.

Suggesting to use - DeferCleanup(func(cleanupCtx context.Context) in place of DeferCleanup(func(ctx context.Context)

Expect(fsxCSITest.Delete(ctx)).To(Succeed(), "should cleanup FSx CSI driver successfully")
})

// Expect(fsxCSITest.Create(ctx)).To(
// Succeed(), "FSx CSI driver should have been created successfully",
// )
Expect(fsxCSITest.Create(ctx)).To(
Succeed(), "FSx CSI driver should have been created successfully",
)

// Expect(fsxCSITest.Validate(ctx)).To(
// Succeed(), "FSx CSI driver should have been validated successfully",
// )
Expect(fsxCSITest.Validate(ctx)).To(
Succeed(), "FSx CSI driver should have been validated successfully",
)
})
}, Label("fsx-csi-driver"))
})
Expand Down
Loading