Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Hints on running integration tests locally

Erik Jaegervall edited this page Mar 6, 2024 · 2 revisions

Repo is currently very focused on using devcontainers. This file list challenges and solutions to running locally. One reason is that devcontainer setup use Ubuntu 20 and some related older Python version (?)

AsyncIO

In test cases you may need to add pytest_asyncio

import pytest
# Add line below
import pytest_asyncio


# @pytest.fixture
@pytest_asyncio.fixture
async def setup_helper() -> VDBHelper:
    logger.info("Using VDB_ADDR={}".format(VDB_ADDRESS))
    helper = VDBHelper(VDB_ADDRESS)
    return helper

Seat Service Docker

As binary is built locally and then put in a docker container Docker, https://github.com/eclipse/kuksa.val.services/blob/main/seat_service/docker-build.sh

In CI this works as both files below use ubuntu:20.04. That could give problem if you run something else locally

A possible solution is select something else as base dor the Dockerfile, like

FROM --platform=$TARGETPLATFORM debian:bookworm as runtime

... if you use bookworm.

A better solution would be to let the Dockerfile build seat service, not a script outside

ENV variables

The scripts expects some env variables to be set, otherwise it reverts to some god-forsaken version

 2093  export USE_DAPR=0
 2097  export GRPC_ENABLE_FORK_SUPPORT=false
 2108  export SEAT_TAG=prerelease
 2109  export HVAC_TAG=prerelease
Clone this wiki locally