GithubHelp home page GithubHelp logo

image-manager's Introduction

Image Manager

[License badge] Docker badge

The Image Manager handles all CRUD operations related to dojot's firmware images.

Usage

These instructions are meant for development only. They should be run on the repository root and will execute the following:

  1. Run the necessary environment (PostgreSQL and Minio) using Docker Compose
  2. Build an image based on the current repository
  3. Run the application inside Docker Compose network
  4. Run the test application

Obs.: Using the option -v $PWD:/usr/src/app local/imagemanager will link the docker image application with the local development code; any changes in the code will update the application immediately using Flask's hot swap mechanism.

On terminal #1:

docker-compose -f local/compose.yml -p imgm up -d
docker build -f Dockerfile -t local/imagemanager .
docker run --rm -it --network imgm_default -p 8000:5000 --network-alias image-manager -v $PWD:/usr/src/app local/imagemanager

On terminal #2:

cd tests/
python3 client.py

image-manager's People

Contributors

jsiloto avatar giovannicuriel avatar mmagr avatar marianoleonardo avatar cfrancisco avatar eduardogmisiuk avatar rascaraficci avatar

Watchers

Gustavo Chaves avatar Márcio Funes avatar  avatar Daniela Petito avatar

Forkers

elgohr-update

image-manager's Issues

Add API tests

POST image metadata - OK
POST image metatadata missing Label - NOK / Assert database isn't changed
POST image metatadata missing FW version - NOK / Assert database isn't changed
POST image metatadata missing HW version - NOK / Assert database isn't changed
POST image metatadata missing SHA1 - NOK / Assert database isn't changed

POST image binary with existing metadata - OK/ Should update metadata with valid image
POST image binary with existing binary - OK?
POST image binary with missing metadata - NOK / DB untouched
POST imabe binary with invalid SHA1 - NOK / DB untouched

GET existing metadata - OK
GET non-existing metadata - NOK
GET existing binary - OK
GET non-existing binary - NOK
GET /image/ (list of all metadata) - OK / Should match uploaded metadata
GET /image/binary/ (list of all binaries) - OK / Should match uploaded binary

DELETE image metadata with non-existing binary - OK
DELETE image metadata with existing binary - OK / Binary should be deleted from DB
DELETE image binary - OK / metadata should be updated with missing binary
DELETE non-existing metadata - NOK
DELETE non-existing binary - NOK
DELETE /image/ - NOK
DELETE /image/binary/ - NOK

PUT image metadata on non-existing UUID - OK
PUT image metadata on existing UUID with matching SHA1 - OK
PUT image metadata on existing UUID with non-matching SHA1 - ERROR
PUT image binary on non-existing UUID - NOK
PUT image binary on existing UUID with matching SHA1 - OK
PUT image binary on existing UUID with non-matching SHA1 - NOK

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.