forked from platformio/platformio-core
Use "/v3//search" endpoint when searching for packages in registry
This commit is contained in:
@ -117,7 +117,7 @@ class RegistryClient(HTTPClient):
|
|||||||
if page:
|
if page:
|
||||||
params["page"] = int(page)
|
params["page"] = int(page)
|
||||||
return self.fetch_json_data(
|
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):
|
def get_package(self, type_, owner, name, version=None):
|
||||||
|
@ -202,7 +202,7 @@ def test_install_from_registry(isolated_pio_core, tmpdir_factory):
|
|||||||
lm.install("AsyncMqttClient-esphome @ 0.8.4", silent=True)
|
lm.install("AsyncMqttClient-esphome @ 0.8.4", silent=True)
|
||||||
assert len(lm.get_installed()) == 3
|
assert len(lm.get_installed()) == 3
|
||||||
pkg = lm.get_package("AsyncTCP-esphome")
|
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")
|
assert not lm.get_package("non-existing-package")
|
||||||
# mbed library
|
# mbed library
|
||||||
assert lm.install("wolfSSL", silent=True)
|
assert lm.install("wolfSSL", silent=True)
|
||||||
|
Reference in New Issue
Block a user