Commit ac43e55f authored by Dimitrios Gogos's avatar Dimitrios Gogos
Browse files

fix: update test stage to include integration tests and clarify Docker setup

parent c3bd79b8
Loading
Loading
Loading
Loading
Loading
+13 −6
Original line number Diff line number Diff line
@@ -46,13 +46,20 @@ format:

test:
  stage: test
  # TODO: add integration tests when we move this to ETSI gitlab
  # Scoped to test/unit explicitly (not just -m deselection): pytest must still
  # import every collected module to read its markers, and test/conformance's
  # module-level schemathesis schema loading is expensive — collecting it here
  # would cost minutes on every pipeline even though none of its tests run.
  # Integration tests (tests/integration) need a Docker daemon for testcontainers.
  # A docker:dind service provides it; DOCKER_HOST/DOCKER_TLS_CERTDIR point the
  # docker-py client (used by testcontainers) at it without requiring TLS certs
  # to be shared into this job's (non-docker) image.
  # test/conformance stays out of this job's scope: it's collected/run separately
  # (see the `conformance` job) since its module-level schemathesis schema
  # loading is expensive and would cost minutes on every pipeline otherwise.
  variables:
    DOCKER_HOST: tcp://docker:2375
    DOCKER_TLS_CERTDIR: ""
  services:
    - docker:dind
  script:
    - pytest tests/unit --cov=src/open_exposure_gateway --cov-branch --cov-report=term-missing || [ $? -eq 5 ] #bypass no tests found error.
    - pytest tests/unit tests/integration --cov=src/open_exposure_gateway --cov-branch --cov-report=term-missing || [ $? -eq 5 ] #bypass no tests found error.
  coverage: '/TOTAL.+ ([0-9]{1,3}(?:\.[0-9]+)?%)/'

conformance: