awslabs / awslabs/aws-lambda-powershell-runtime
Scenario testing (synthetic deployments into Lambda)
- Langage dominant
- PowerShell
- Étoiles
- 65
- Forks
- 21
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
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.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par localiser les tests Pester existants pour le script layer-build et examiner le flux d’identifiants AWS IAM proposé pour GitHub Actions. Utilisez les SAM templates, le runtime layer et le hello-world handler décrits dans l’issue comme points d’entrée des tests de scénario. Le travail est considéré comme terminé lorsque les cas Lambda spécifiques à la fonctionnalité sont invoqués avec succès, que les assertions réussissent et que les SAM stacks déployés sont supprimés.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- aws, github-actions, powershell
- Domaine
- ci-cd, cloud, testing
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100