nice-cat-91582
09/15/2019, 1:31 AMthankful-optician-22583
09/15/2019, 3:10 AMnice-cat-91582
09/15/2019, 3:17 AMthankful-optician-22583
09/15/2019, 3:21 AMconst ingress_service = new k8s.core.v1.Service("localstack", {
metadata: {
labels: deployment.spec.template.metadata.labels,
namespace: "manual-test"
},
spec: {
type: "ClusterIP",
ports: [{name: "sqs", port: 4576, targetPort: 4576, protocol: "TCP" }, [{name: "S3", port: 4572 targetPort: 4572, protocol: "TCP" }],
selector: appLabels
},
},
{provider:provider}
);
limited-rainbow-51650
09/15/2019, 2:49 PMunit testing
dissappears if you try to replicate your stack locally.
TL;DR: Dissect your problem to smaller problems and unit test the smaller chunks
Why not dissect your setup in a few unit tests:
1. unit test the function or method that transforms the Lambda input (e.g. a JSON) to the required input for the PDF generation
2. unit test a separate function or method which given some input creates a PDF. Validation e.g by http://www.pdfunit.com (Haven’t used my self but was the top Google search result)
3. unit test the post processing, e.g. sending the PDF as an email in a mocked setup.
You no longer need Docker, replicated setups and alike…thankful-optician-22583
09/15/2019, 3:00 PMnice-cat-91582
09/15/2019, 5:26 PM