Code Monkey home page Code Monkey logo

cypress-parallel-api's Introduction

cypress-parallel-api CircleCI

cypress-parallel-api is the api used by cypress-parallel frontend UI. The api permit to create pods inside your kubernetes cluster triggered by curl commands or via UI.

API url

By default, the api url is http://127.0.0.1:8080 but it can be override with os environment variable CYPRESS_PARALLEL_API_URL.

Database

Our api is developped with PostgresSQL database so the environment variable CYPRESS_PARALLEL_API_DB_URI must be set:

export CYPRESS_PARALLEL_API_DB_URI="postgres://USERNAME:PASSWORD@HOST:PORT/DB_NAME?sslmode=disable"

Development

Kind

During you local development, you must set the variable CYPRESS_PARALLEL_API_K8S_CLIENT_OUTSIDE in order to create to make the api loggued in with your .kube/config

export CYPRESS_PARALLEL_API_K8S_CLIENT_OUTSIDE=true

Please read Kind setup here

Start your postgres sql instance

sudo docker-compose up -d -f docker-compose.yml.yaml

Debugging

To enable the debug mode on the api:

export CYPRESS_PARALLEL_API_LOG_LEVEL=debug

To enable the debug mode on the cli:

export CYPRESS_PARALLEL_CLI_LOG_LEVEL=debug

Content types

Supported content types are:

  • application/x-www-form-urlencoded
  • application/json

Unit testing

Make sure to add unit testing for almost every new features in order to ensure the quality of the api.

Run tests with:

go test -v ./... -coverprofile=coverage.out

See covering in the browser with:

go tool cover -html=coverage.out

See covering in the shell with:

go tool cover -func=coverage.out

Linter

# https://freshman.tech/linting-golang/
go install github.com/nametake/golangci-lint-langserver@latest

cypress-parallel-api's People

Contributors

lord-y avatar

Watchers

 avatar  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.