awslabs / awslabs/aws-lambda-powershell-runtime

Scenario testing (synthetic deployments into Lambda)

Đang mở
#44 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
PowerShell
Star
65
Fork
21
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

I'm excited to see unit tests being added here. Given a lot of this runtime's functionality is based on Lambda itself, it would be great if we could get programmatically test runtime features directly within Lambda.

I'm envisioning some Pester tests that:
* Build the runtime layer (maybe in a `BeforeAll{}` block - I think we already have tests for the layer-build script?)
* Iterate over a set of SAM templates (or multiple instantiations of a parameterized template) that:
* Refer to the runtime layer
* Deploy a "hello world"-type handler
* Invoke the lambda, once the deployment finishes
* Assert that the lambda runs
* Tear down SAM stacks when done

If we're trying to test specific features (e.g. compressed module handling, I would expect that one of the "test cases" (i.e. instantiations of the SAM template) deploys a Lambda that uses said feature.

I know GHA has a relatively straightforward integration story with AWS IAM - I envision GHA fetching AWS creds before running tests, whereas people testing locally would be able to use whatever AWS CLI creds they have configured.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách xác định các bài kiểm thử Pester hiện có cho script layer-build và xem xét luồng thông tin xác thực AWS IAM được đề xuất cho GitHub Actions. Sử dụng các SAM templates, runtime layer và hello-world handler được mô tả trong issue làm các điểm bắt đầu cho kiểm thử kịch bản. Được xem là hoàn tất khi các trường hợp Lambda dành riêng cho tính năng được gọi thành công, các assertions đều đạt và các SAM stacks đã triển khai được gỡ bỏ.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
aws, github-actions, powershell
Lĩnh vực
ci-cd, cloud, testing
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.