Skip to content

Commit

Permalink
fix: Use bootstrapped etcd testutil
Browse files Browse the repository at this point in the history
  • Loading branch information
rapsealk committed Nov 3, 2023
1 parent 58a7a84 commit 5ded678
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,6 @@ jobs:
with:
named-caches-hash: ${{ hashFiles('python*.lock', 'tools/*.lock') }}
cache-lmdb-store: 'true'
- name: Run halfstack etcd container
run: |
sed -i'' "s/- \"8120:2379\"/- \"8121:2379\"/g" docker-compose.halfstack-main.yml
docker-compose -f docker-compose.halfstack-main.yml run -d --service-ports backendai-half-etcd
- name: Test
timeout-minutes: 15
run: |
Expand Down
6 changes: 3 additions & 3 deletions tests/manager/models/test_etcd.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
from graphene import Schema
from graphene.test import Client

from ai.backend.common.types import HostPortPair
from ai.backend.manager.config import SharedConfig
from ai.backend.manager.models.gql import GraphQueryContext, Mutations, Queries
from ai.backend.testutils.bootstrap import etcd_container # noqa: F401

CONTAINER_REGISTRY_FIELDS = """
container_registry {
Expand All @@ -27,9 +27,9 @@ def client() -> Client:


@pytest.fixture(scope="module")
def context() -> GraphQueryContext:
def context(etcd_container) -> GraphQueryContext: # noqa: F811
shared_config = SharedConfig(
etcd_addr=HostPortPair("0.0.0.0", 8121),
etcd_addr=etcd_container[1],
etcd_user="",
etcd_password="",
namespace="local",
Expand Down

0 comments on commit 5ded678

Please sign in to comment.