mithril-security / blindai

Confidential AI deployment with secure enclaves :lock:
https://www.mithrilsecurity.io/
Apache License 2.0
502 stars 36 forks source link

tests: Fix running tests in the CI #32

Closed cchudant closed 2 years ago

cchudant commented 2 years ago

Description

Sometimes, the tests don't work in the CI. This is because there are no checks on whether the server has got time to launch properly if BLINDAI_TEST_NO_LAUNCH_SERVER is set (this env var is set on the CI because the CI launches the server itself, using docker) This caused the tests to sometimes run before the app was running.

I have also changed some other things, such as adding a bit of sleep, fixing the timeout (which, turns out, wasn't really working) and checking for the right port. The tests should be much much more reliable now on the CI.

Related Issue

None

Type of change

How Has This Been Tested?

Run the CI, and run the tests locally

Checklist: