Use "/v3//search" endpoint when searching for packages in registry

This commit is contained in:
Ivan Kravets
2021-11-27 15:00:10 +02:00
parent ea1c9dec12
commit 85c582bc93
2 changed files with 2 additions and 2 deletions

View File

@ -117,7 +117,7 @@ class RegistryClient(HTTPClient):
if page:
params["page"] = int(page)
return self.fetch_json_data(
"get", "/v3/packages", params=params, cache_valid="1h"
"get", "/v3/search", params=params, cache_valid="1h"
)
def get_package(self, type_, owner, name, version=None):

View File

@ -202,7 +202,7 @@ def test_install_from_registry(isolated_pio_core, tmpdir_factory):
lm.install("AsyncMqttClient-esphome @ 0.8.4", silent=True)
assert len(lm.get_installed()) == 3
pkg = lm.get_package("AsyncTCP-esphome")
assert pkg.metadata.spec.owner == "esphome"
assert pkg.metadata.spec.owner == "ottowinter"
assert not lm.get_package("non-existing-package")
# mbed library
assert lm.install("wolfSSL", silent=True)