()
| 9 | use super::*; |
| 10 | |
| 11 | async fn new_certbot() -> Result<CertBot> { |
| 12 | let cf_api_token = std::env::var("CLOUDFLARE_API_TOKEN").expect("CLOUDFLARE_API_TOKEN not set"); |
| 13 | let domains = vec![std::env::var("TEST_DOMAIN").expect("TEST_DOMAIN not set")]; |
| 14 | let config = CertBotConfig::builder() |
| 15 | .acme_url(LetsEncrypt::Staging.url()) |
| 16 | .auto_create_account(true) |
| 17 | .credentials_file("./test-workdir/credentials.json") |
| 18 | .cf_api_token(cf_api_token) |
| 19 | .cert_dir("./test-workdir/backup") |
| 20 | .cert_file("./test-workdir/live/cert.pem") |
| 21 | .key_file("./test-workdir/live/key.pem") |
| 22 | .cert_subject_alt_names(domains) |
| 23 | .renew_interval(Duration::from_secs(30)) |
| 24 | .renew_timeout(Duration::from_secs(120)) |
| 25 | .renew_expires_in(Duration::from_secs(7772187)) |
| 26 | .max_dns_wait(Duration::from_secs(300)) |
| 27 | .auto_set_caa(false) |
| 28 | .build(); |
| 29 | config.build_bot().await |
| 30 | } |
| 31 | |
| 32 | #[tokio::test] |
| 33 | async fn test_certbot() { |
no test coverage detected