CERT-Polska / mquery

YARA malware query accelerator (web frontend)
GNU Affero General Public License v3.0
413 stars 77 forks source link

Clean up e2e test dockerfile #426

Open msm-cert opened 3 weeks ago

msm-cert commented 3 weeks ago

Right now this setup is needlessly complicated:

      - name: run web with docker compose
        run: docker compose up --build -d web --wait
      - name: init the database
        run: docker compose exec -it -w /usr/src/app/src/ web alembic upgrade head
      - name: run the rest of the code
        run: docker compose up -d
      - name: run e2e tests
        run: docker run --net mquery_default -v $(readlink -f ./samples):/mnt/samples mquery_tests

specifically, this line is probably unnecessary, and we can start everything at once:

 -name: init the database
     run: docker compose exec -it -w /usr/src/app/src/ web alembic upgrade head

But before removing it we should make sure there are no race conditions and e2e tests still work.

It's possible that just this is enough for setup:

 docker compose up --build -d --wait

(and then run mquery_tests)