Mercurial > lbo > hg > async-google-apis
changeset 152:4074e0f33ca4
test_integration: Little progress
author | Lewin Bormann <lbo@spheniscida.de> |
---|---|
date | Tue, 27 Oct 2020 16:37:44 +0100 |
parents | a6620695e23c |
children | 87e951988e86 |
files | test_integration/Cargo.toml test_integration/src/lib.rs |
diffstat | 2 files changed, 15 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/test_integration/Cargo.toml Tue Oct 27 16:05:44 2020 +0100 +++ b/test_integration/Cargo.toml Tue Oct 27 16:37:44 2020 +0100 @@ -12,7 +12,7 @@ anyhow = "~1.0" serde = "~1.0" env_logger = "~0.8" +hyper = "~0.13" hyper-rustls = "~0.20" -hyper = "~0.13" mockito = "~0.27" tokio = { version = "~0.2", features = ["full"] }
--- a/test_integration/src/lib.rs Tue Oct 27 16:05:44 2020 +0100 +++ b/test_integration/src/lib.rs Tue Oct 27 16:37:44 2020 +0100 @@ -35,9 +35,21 @@ appsec } + fn hyper_client() -> agac::TlsClient { + hyper::Client::builder().build(hyper_rustls::HttpsConnector::new()) + } + #[tokio::test] async fn it_works() { - println!("{}", mockito::server_url()); - println!("{:?}", read_client_secret().await); + mockito::start(); + println!("Mockito running at {}", mockito::server_url()); + let appsec = read_client_secret().await; + let cl = hyper_client(); + let auth = agac::yup_oauth2::InstalledFlowAuthenticator::builder( + appsec, + agac::yup_oauth2::InstalledFlowReturnMethod::Interactive, + ) + .hyper_client(cl.clone()) + .build(); } }