rust-afterburn/0003-providers-microsoft-import-crate-retry.patch
2023-03-20 20:46:22 -04:00

88 lines
3.3 KiB
Diff

From 1e46b818717d250dc3e0a43a0680e919f7c1c3df Mon Sep 17 00:00:00 2001
From: Benjamin Gilbert <bgilbert@redhat.com>
Date: Mon, 20 Mar 2023 02:32:15 -0400
Subject: [PATCH 3/6] providers/microsoft: import crate::retry
---
src/providers/microsoft/azure/mock_tests.rs | 7 ++++---
src/providers/microsoft/azurestack/mock_tests.rs | 7 ++++---
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/providers/microsoft/azure/mock_tests.rs b/src/providers/microsoft/azure/mock_tests.rs
index 93682012554b..476555dc6368 100644
--- a/src/providers/microsoft/azure/mock_tests.rs
+++ b/src/providers/microsoft/azure/mock_tests.rs
@@ -1,4 +1,5 @@
use crate::providers::{microsoft::azure, MetadataProvider};
+use crate::retry;
use mockito::{self, Matcher};
/// Response body for goalstate (with certificates endpoint).
@@ -135,7 +136,7 @@ fn test_boot_checkin() {
mockito::reset();
// Check error logic, but fail fast without re-trying.
- let client = crate::retry::Client::try_new().unwrap().max_retries(0);
+ let client = retry::Client::try_new().unwrap().max_retries(0);
azure::Azure::with_client(Some(client)).unwrap_err();
}
@@ -163,7 +164,7 @@ fn test_hostname() {
mockito::reset();
// Check error logic, but fail fast without re-trying.
- let client = crate::retry::Client::try_new().unwrap().max_retries(0);
+ let client = retry::Client::try_new().unwrap().max_retries(0);
azure::Azure::with_client(Some(client)).unwrap_err();
}
@@ -192,7 +193,7 @@ fn test_vmsize() {
mockito::reset();
// Check error logic, but fail fast without re-trying.
- let client = crate::retry::Client::try_new().unwrap().max_retries(0);
+ let client = retry::Client::try_new().unwrap().max_retries(0);
azure::Azure::with_client(Some(client)).unwrap_err();
}
diff --git a/src/providers/microsoft/azurestack/mock_tests.rs b/src/providers/microsoft/azurestack/mock_tests.rs
index 8c5a0d26399e..655908237337 100644
--- a/src/providers/microsoft/azurestack/mock_tests.rs
+++ b/src/providers/microsoft/azurestack/mock_tests.rs
@@ -1,4 +1,5 @@
use crate::providers::{microsoft::azurestack, MetadataProvider};
+use crate::retry;
use mockito::{self, Matcher};
/// Response body for goalstate (with certificates endpoint).
@@ -135,7 +136,7 @@ fn test_boot_checkin() {
mockito::reset();
// Check error logic, but fail fast without re-trying.
- let client = crate::retry::Client::try_new().unwrap().max_retries(0);
+ let client = retry::Client::try_new().unwrap().max_retries(0);
azurestack::AzureStack::with_client(Some(client)).unwrap_err();
}
@@ -164,7 +165,7 @@ fn test_identity() {
mockito::reset();
// Check error logic, but fail fast without re-trying.
- let client = crate::retry::Client::try_new().unwrap().max_retries(0);
+ let client = retry::Client::try_new().unwrap().max_retries(0);
azurestack::AzureStack::with_client(Some(client)).unwrap_err();
}
@@ -193,7 +194,7 @@ fn test_hostname() {
mockito::reset();
// Check error logic, but fail fast without re-trying.
- let client = crate::retry::Client::try_new().unwrap().max_retries(0);
+ let client = retry::Client::try_new().unwrap().max_retries(0);
azurestack::AzureStack::with_client(Some(client)).unwrap_err();
}
--
2.39.2