Giter Club home page Giter Club logo

portainers-spark's Introduction

Portainer's Project

This project validates the setup config via string format and returns a message if the setup is valid or not via HTTP. Inside of the project there are 2 folders. The client and the library (portainer's) folders.

Run locally

The project has a Makefile that allows you to do the following actions:

  1. Run the command make init to install all the dependencies for client and library

  2. Then, run make run to start the server

    a. Once the server started, in a Postman or browser client, send a request like: localhost:10000/validate/{setup} where {setup} is the configuration that wants to be validated.

Example: localhost:10000/validate/[{()}{[()()]}{[()]}]

Test

Run the command make test

go test -v -cover
=== RUN   TestValidateSetup
=== RUN   TestValidateSetup/Invalid_Length
=== RUN   TestValidateSetup/Invalid_Characters
=== RUN   TestValidateSetup/Invalid_Setup
=== RUN   TestValidateSetup/Valid_Setup_Example_1
=== RUN   TestValidateSetup/Valid_Setup_Example_2
=== RUN   TestValidateSetup/Valid_Setup_Example_3
=== RUN   TestValidateSetup/Valid_Complex_Setup
--- PASS: TestValidateSetup (0.00s)
    --- PASS: TestValidateSetup/Invalid_Length (0.00s)
    --- PASS: TestValidateSetup/Invalid_Characters (0.00s)
    --- PASS: TestValidateSetup/Invalid_Setup (0.00s)
    --- PASS: TestValidateSetup/Valid_Setup_Example_1 (0.00s)
    --- PASS: TestValidateSetup/Valid_Setup_Example_2 (0.00s)
    --- PASS: TestValidateSetup/Valid_Setup_Example_3 (0.00s)
    --- PASS: TestValidateSetup/Valid_Complex_Setup (0.00s)
PASS
coverage: 100.0% of statements
ok      spark/challenge/portainer       0.444s

portainers-spark's People

Watchers

 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.