Giter Club home page Giter Club logo

dvsa.cvs-svc-lec-test-results's Introduction

cvs-svc-lec-test-results

Run AWS Lambda node functions locally with a mock API Gateway

  • npm install
  • BRANCH=local npm start

Git Hooks

Please set up the following prepush git hook in .git/hooks/pre-push

#!/bin/sh
npm run prepush && git log -p | scanrepo

Security

Please install and run the following securiy programs as part of your testing process:

https://github.com/awslabs/git-secrets

  • After installing, do a one-time set up with git secrets --register-aws. Run with git secrets --scan.

https://github.com/UKHomeOffice/repo-security-scanner

  • After installing, run with git log -p | scanrepo.

These will be run as part of prepush so please make sure you set up the git hook above so you don't accidentally introduce any new security vulnerabilities.

Testing

In order to test, you need to run the following:

  • npm run test for unit tests
  • npm run test-i for integration tests

Environmental variables

  • The BRANCH environment variable indicates in which environment is this application running. Use BRANCH=local for local deployment. This variable is required when starting the application or running tests.

Local Running

To run this locally, add the following environment variables to your run configuration(s):

  • AWS_XRAY_CONTEXT_MISSING = LOG_ERROR
  • SLS_DEBUG = *
  • BRANCH = LOCAL

and change the serverless.yml so that Custom > DynamoDB >

  •  migrate: true
     seed: true
     noStart: false
    

NB: Do not push these changes. They are for local running only

dvsa.cvs-svc-lec-test-results's People

Contributors

khodderdvsa avatar m-ujaffer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.