awslabs / awslabs/aws-lambda-powershell-runtime

Scenario testing (synthetic deployments into Lambda)

未关闭
#44 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
PowerShell
星标
65
派生
21
PR 合并指标
30 天内没有已合并 PR

描述

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.

贡献指南

打开贡献指南

调研方向

首先定位现有的 layer-build 脚本 Pester 测试,并审查为 GitHub Actions 提议的 AWS IAM 凭证流程。使用 issue 中描述的 SAM templates、runtime layer 和 hello-world handler 作为场景测试的入口点。当特定于功能的 Lambda 用例成功调用、assertions 通过且已部署的 SAM stacks 被拆除时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
aws, github-actions, powershell
领域
ci-cd, cloud, testing
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。