Giter VIP home page Giter VIP logo

go-rti-testing's Introduction

go-rti-testing

Полное описание тестового задания: go-rti-testing
Приложение тестировалось на Ubuntu 18.04.4 LTS

Installation

  1. Убедиться, что уже установлен Docker Engine;
  2. Собрать Docker образ: docker build -t go-rti-testing .;
  3. Создать и запустить контейнер: docker run --publish 8000:8080 --detach --name grt go-rti-testing;
  4. Убедившись в работе, можно удалить контейнер: docker rm --force grt.

Other

Пример запроса

curl --location --request POST 'http://localhost:8000/calculate' \
--header 'Content-Type: application/json' \
--data-raw '{
   "product":{
      "name":"Игровой",
      "components":[
         {
            "isMain":true,
            "name":"Интернет",
            "prices":[
               {
                  "cost":500,
                  "priceType":"COST",
                  "ruleApplicabilities":[
                     {
                        "codeName":"technology",
                        "operator":"EQ",
                        "value":"xpon"
                     },
                     {
                        "codeName":"internetSpeed",
                        "operator":"EQ",
                        "value":"100"
                     }
                  ]
               },
               {
                  "cost":900,
                  "priceType":"COST",
                  "ruleApplicabilities":[
                     {
                        "codeName":"technology",
                        "operator":"EQ",
                        "value":"xpon"
                     },
                     {
                        "codeName":"internetSpeed",
                        "operator":"EQ",
                        "value":"200"
                     }
                  ]
               },
               {
                  "cost":10,
                  "priceType":"DISCOUNT",
                  "ruleApplicabilities":[
                     {
                        "codeName":"internetSpeed",
                        "operator":"GTE",
                        "value":"50"
                     }
                  ]
               }
            ]
         },
         {
            "name":"ADSL Модем",
            "prices":[
               {
                  "cost":300,
                  "priceType":"COST",
                  "ruleApplicabilities":[
                     {
                        "codeName":"technology",
                        "operator":"EQ",
                        "value":"adsl"
                     }
                  ]
               }
            ]
         }
      ]
   },
   "conditions":[
      {
         "ruleName":"technology",
         "value":"xpon"
      },
      {
         "ruleName":"internetSpeed",
         "value":"200"
      }
   ]
}'

go-rti-testing's People

Contributors

adeptxaoca avatar

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.