pub async fn execute<F, P>(&self, make_provider: impl Fn(ProviderConfig) -> F)
    where
        F: Future<Output = P>,
        P: ProvideCredentials,
    {
        let connector = ReplayingConnection::new(self.network_traffic.events().clone());
        let conf = ProviderConfig::empty()
            .with_fs(self.fs.clone())
            .with_env(self.env.clone())
            .with_connector(DynConnector::new(connector.clone()))
            .load_default_region()
            .await;
        let provider = make_provider(conf).await;
        let result = provider.provide_credentials().await;
        self.log_info();
        self.check_results(&result);
        // todo: validate bodies
        match connector.validate(&["CONTENT-TYPE"], |_expected, _actual| Ok(())) {
            Ok(()) => {}
            Err(e) => panic!("{}", e),
        }
    }
/// Execute a test case. Failures lead to panics.
Execute a test case. Failures lead to panics.
Execute a test case . Failures lead to panics .
pub async fn execute<F, P>(&self, make_provider: impl Fn(ProviderConfig) -> F)
    where
        F: Future<Output = P>,
        P: ProvideCredentials,
    {
        let connector = ReplayingConnection::new(self.network_traffic.events().clone());
        let conf = ProviderConfig::empty()
            .with_fs(self.fs.clone())
            .with_env(self.env.clone())
            .with_connector(DynConnector::new(connector.clone()))
            .load_default_region()
            .await;
        let provider = make_provider(conf).await;
        let result = provider.provide_credentials().await;
        self.log_info();
        self.check_results(&result);
        // todo: validate bodies
        match connector.validate(&["CONTENT-TYPE"], |_expected, _actual| Ok(())) {
            Ok(()) => {}
            Err(e) => panic!("{}", e),
        }
    }
pub async fn execute < F , P > ( & self , make_provider : impl Fn ( ProviderConfig ) -> F ) where F : Future < Output = P > , P : ProvideCredentials , { let connector = ReplayingConnection :: new ( self . network_traffic . events ( ) . clone ( ) ) ; let conf = ProviderConfig :: empty ( ) . with_fs ( self . fs . clone ( ) ) . with_env ( self . env . clone ( ) ) . with_connector ( DynConnector :: new ( connector . clone ( ) ) ) . load_default_region ( ) . await ; let provider = make_provider ( conf ) . await ; let result = provider . provide_credentials ( ) . await ; self . log_info ( ) ; self . check_results ( & result ) ; // todo: validate bodies match connector . validate ( & [ " " ] , | _expected , _actual | Ok ( ( ) ) ) { Ok ( ( ) ) => { } Err ( e ) => panic ! ( " " e ) , } }
Execute a test case.
Execute a test case .
&self
make_provider
impl Fn(ProviderConfig) -> F
&self
make_provider
impl Fn(ProviderConfig) -> F