awslabs / awslabs/aws-lambda-powershell-runtime

Scenario testing (synthetic deployments into Lambda)

オープン
#44 コメント 2 件 リアクション 0 件 担当者 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 credential flow を確認します。issue に記載されている SAM templates、runtime layer、hello-world handler をシナリオテストのエントリポイントとして使用します。機能固有の Lambda ケースが正常に呼び出され、assertions が通り、デプロイされた SAM stacks が削除されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
aws, github-actions, powershell
領域
ci-cd, cloud, testing
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。