awslabs / awslabs/aws-lambda-powershell-runtime
Scenario testing (synthetic deployments into Lambda)
- Lenguaje dominante
- PowerShell
- Estrellas
- 65
- Forks
- 21
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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.
Guía de contribución
Línea de trabajo
Comienza localizando las pruebas de Pester existentes para el script layer-build y revisando el flujo de credenciales AWS IAM propuesto para GitHub Actions. Usa las SAM templates, el runtime layer y el hello-world handler descritos en el issue como puntos de entrada para las pruebas de escenario. Se considera terminado cuando los casos de Lambda específicos de la funcionalidad se invocan correctamente, las assertions pasan y los SAM stacks desplegados se eliminan.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- aws, github-actions, powershell
- Área
- ci-cd, cloud, testing
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100