Skip to content

Commit d77ab13

Browse files
committed
tests: Delete ignored tests hitting real endpoints
1 parent c57a25f commit d77ab13

File tree

3 files changed

+0
-64
lines changed

3 files changed

+0
-64
lines changed

Cargo.lock

Lines changed: 0 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ features = ["rustls-tls-native-roots", "json"]
4444
vergen = { version = "8.2.6", features = ["git", "gitcl", "build"] } # vergen passes metadata like the version and git commit hash to cargo as a compile-time environment variables
4545

4646
[dev-dependencies]
47-
dotenv = "0.15.0"
4847
indoc = "2.0.5"
4948
ldap3 = { version = "0.11.1", default-features = false, features = ["tls-native"] }
5049
serde_yaml = "0.9.34"

src/sources/ukt.rs

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -295,60 +295,4 @@ mod tests {
295295
let result = ukt.fetch_list(incorrect_oauth2_token).await;
296296
assert!(result.is_err(), "Didn't expect to fetch email list: {result:?}");
297297
}
298-
299-
#[tokio::test]
300-
#[ignore]
301-
/// Connects to the real URL in config to get the OAuth2 token
302-
/// You need to have a `.env` file with UKT_CLIENT_ID and UKT_CLIENT_SECRET
303-
/// Run with: cargo test -- --ignored real_test_get_oauth2_token
304-
async fn real_test_get_oauth2_token() {
305-
dotenv::dotenv().ok();
306-
let client_id =
307-
std::env::var("UKT_CLIENT_ID").expect("Set UKT_CLIENT_ID environment variable");
308-
let client_secret =
309-
std::env::var("UKT_CLIENT_SECRET").expect("Set UKT_CLIENT_SECRET environment variable");
310-
311-
let mut config = load_config();
312-
if let Some(ukt_config) = &mut config.sources.ukt {
313-
ukt_config.client_id = client_id;
314-
ukt_config.client_secret = client_secret;
315-
}
316-
317-
let ukt_config = config.sources.ukt.expect("UktSource configuration is missing");
318-
319-
let ukt = UktSource::new(ukt_config);
320-
321-
let result = ukt.get_oauth2_token().await;
322-
323-
assert!(result.is_ok());
324-
}
325-
326-
#[tokio::test]
327-
#[ignore]
328-
/// Connects to the real URL in config to get the email list
329-
/// You need to have a `.env` file with UKT_CLIENT_ID and UKT_CLIENT_SECRET
330-
/// Run with: cargo test -- --ignored real_test_get_oauth2_token
331-
async fn real_test_fetch_list() {
332-
dotenv::dotenv().ok();
333-
let client_id =
334-
std::env::var("UKT_CLIENT_ID").expect("Set UKT_CLIENT_ID environment variable");
335-
let client_secret =
336-
std::env::var("UKT_CLIENT_SECRET").expect("Set UKT_CLIENT_SECRET environment variable");
337-
338-
let mut config = load_config();
339-
if let Some(ukt_config) = &mut config.sources.ukt {
340-
ukt_config.client_id = client_id;
341-
ukt_config.client_secret = client_secret;
342-
}
343-
344-
let ukt_config = config.sources.ukt.expect("UktSource configuration is missing");
345-
346-
let ukt = UktSource::new(ukt_config);
347-
348-
let oauth2_token = ukt.get_oauth2_token().await.expect("Failed to get access token");
349-
350-
let result = ukt.fetch_list(oauth2_token).await;
351-
352-
assert!(result.is_ok());
353-
}
354298
}

0 commit comments

Comments
 (0)