Skip to content

Commit

Permalink
Fix kbs list
Browse files Browse the repository at this point in the history
  • Loading branch information
sunbit committed Jan 17, 2025
1 parent 8a9e228 commit 508483e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion nuclia_e2e/nuclia_e2e/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
},
}


class ManagerAPI:
def __init__(self, global_api, session: aiohttp.ClientSession):
self.global_api = global_api
Expand Down Expand Up @@ -356,7 +357,7 @@ async def cleanup_test_account(global_api: GlobalAPI):
async def clean_kb_test(request, regional_api_config):
kbs = NucliaKBS()
kb_slug = regional_api_config["test_kb_slug"]
all_kbs = await asyncio.to_thread(partial(kbs.list, zone=regional_api_config["zone_slug"]))
all_kbs = await asyncio.to_thread(kbs.list)
kb_ids_by_slug = {kb.slug: kb.id for kb in all_kbs}
kb_id = kb_ids_by_slug.get(kb_slug)
try:
Expand Down
2 changes: 1 addition & 1 deletion nuclia_e2e/nuclia_e2e/tests/nua/test_da_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
from nuclia_models.worker.tasks import TaskName
from nuclia_models.worker.tasks import TaskStart
from nucliadb_protos.writer_pb2 import BrokerMessage
from time import time

import aiofiles
import aiohttp
import asyncio
import base64
import pytest
from time import time


@dataclass
Expand Down
2 changes: 1 addition & 1 deletion nuclia_e2e/nuclia_e2e/tests/test_kb.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async def wait_for(

async def get_kbid_from_slug(zone: str, slug: str) -> str:
kbs = NucliaKBS()
all_kbs = await asyncio.to_thread(partial(kbs.list, zone=zone))
all_kbs = await asyncio.to_thread(kbs.list)
kbids_by_slug = {kb.slug: kb.id for kb in all_kbs}
kbid = kbids_by_slug.get(slug)
return kbid
Expand Down

0 comments on commit 508483e

Please sign in to comment.