update main for new api

This commit is contained in:
Vincent Stuyck 2026-02-28 01:10:29 +01:00
parent b1d696de84
commit 7014b83ba2

View File

@ -55,12 +55,12 @@ async fn test_folders(client: Client) -> Result<()> {
info!("creating testfolder"); info!("creating testfolder");
folderapi folderapi
.create(&creq, &()) .create(&creq)
.await .await
.inspect_err(|e| error!("failed to create folder: {e}"))?; .inspect_err(|e| error!("failed to create folder: {e}"))?;
let folder = folderapi let folder = folderapi
.read(TESTDIRQRY, &()) .read(TESTDIRQRY)
.await .await
.inspect_err(|e| error!("failed to read folder: {e}"))?; .inspect_err(|e| error!("failed to read folder: {e}"))?;
info!("folder config on site: {folder:?}"); info!("folder config on site: {folder:?}");
@ -145,7 +145,7 @@ async fn test_hosts(client: Client) -> Result<()> {
info!("deleting host"); info!("deleting host");
hostapi hostapi
.delete(TESTHOST, &()) .delete(TESTHOST)
.await .await
.inspect_err(|e| error!("failed to delete host: {e}"))?; .inspect_err(|e| error!("failed to delete host: {e}"))?;
@ -171,12 +171,12 @@ async fn test_hosttags(client: Client) -> Result<()> {
info!("creating test tag group"); info!("creating test tag group");
tagapi tagapi
.create(&creq, &()) .create(&creq)
.await .await
.inspect_err(|e| error!("failed to create tag group: {e}"))?; .inspect_err(|e| error!("failed to create tag group: {e}"))?;
let tag_group = tagapi let tag_group = tagapi
.read(TESTTAG, &()) .read(TESTTAG)
.await .await
.inspect_err(|e| error!("failed to read tag group: {e}"))?; .inspect_err(|e| error!("failed to read tag group: {e}"))?;
info!("tag group config: {tag_group:#?}"); info!("tag group config: {tag_group:#?}");
@ -188,14 +188,14 @@ async fn test_hosttags(client: Client) -> Result<()> {
.inspect_err(|e| error!("failed to update tag group: {e}"))?; .inspect_err(|e| error!("failed to update tag group: {e}"))?;
let tag_groups = tagapi let tag_groups = tagapi
.bulk_read(&()) .bulk_read()
.await .await
.inspect_err(|e| error!("failed to read all tag groups: {e}")); .inspect_err(|e| error!("failed to read all tag groups: {e}"));
info!("all tag groups: {tag_groups:?}"); info!("all tag groups: {tag_groups:?}");
info!("deleting tag group"); info!("deleting tag group");
tagapi tagapi
.delete(TESTTAG, &()) .delete(TESTTAG)
.await .await
.inspect_err(|e| error!("failed to delete tag group: {e}"))?; .inspect_err(|e| error!("failed to delete tag group: {e}"))?;