Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MP91 committed Jan 18, 2024
1 parent 429d4a7 commit 235e9ad
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ jobs:

- name: Run the daparized databroker binary
run: |
./.vscode/scripts/ensure-dapr.sh DAPR
./.vscode/scripts/run-mosquitto.sh &
./.vscode/scripts/run-vehicledatabroker.sh DAPR &
./.vscode/scripts/ensure-dapr.sh DAPR --task
./.vscode/scripts/run-mosquitto.sh --task &
./.vscode/scripts/run-vehicledatabroker.sh DAPR --task &
sleep 10s
- name: Run unit and integration tests
Expand Down
2 changes: 1 addition & 1 deletion NOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ SPDX-License-Identifier: Apache-2.0
### Development
| Software | License |
| :------: | :------------------------------------------------------------------: |
| GRPC | https://github.com/grpc/grpc/blob/master/LICENSE |
| GRPC | https://github.com/grpc/grpc/blob/master/LICENSE |
| Pre-Commit | https://github.com/pre-commit/pre-commit/blob/main/LICENSE |
| Mypy | https://github.com/python/mypy/blob/master/LICENSE |
| Ruff | https://raw.githubusercontent.com/astral-sh/ruff/main/LICENSE |
Expand Down
9 changes: 5 additions & 4 deletions tests/integration/databroker_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,19 @@
#
# SPDX-License-Identifier: Apache-2.0

# ruff: noqa: E402

""" Tests for methods in VehicleDataBrokerClient """

import os

os.environ["SDV_MIDDLEWARE_TYPE"] = "native"
from unittest import mock

import grpc
import pytest

from velocitas_sdk import config
from velocitas_sdk.config import Config
from velocitas_sdk.test.databroker_testhelper import SubscribeException, Vehicle
from velocitas_sdk.test.inttesthelper import IntTestHelper
from velocitas_sdk.vdb.client import VehicleDataBrokerClient
Expand All @@ -30,10 +33,8 @@

@pytest.fixture(autouse=True)
def reset():
os.environ["SDV_MIDDLEWARE_TYPE"] = "native"
config._config = Config("native")
config.middleware = config._config.middleware
VehicleDataBrokerClient._instance = None
config._config = None


@pytest.mark.asyncio
Expand Down
7 changes: 5 additions & 2 deletions tests/integration/pubsub_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@
#
# SPDX-License-Identifier: Apache-2.0

# ruff: noqa: E402

""" Tests for methods in VehicleDataBrokerClient """

import os

os.environ["SDV_MIDDLEWARE_TYPE"] = "dapr"

import pytest

from velocitas_sdk import config
Expand All @@ -26,9 +30,8 @@

@pytest.fixture(autouse=True)
def reset():
os.environ["SDV_MIDDLEWARE_TYPE"] = "dapr"
config._config = config.Config("dapr")
VehicleDataBrokerClient._instance = None
config._config = None


@pytest.mark.asyncio
Expand Down

0 comments on commit 235e9ad

Please sign in to comment.