Skip to content

Commit 1611c67

Browse files
authored
test(gitea): fix broken test in CI (#281)
The test was broken in CI, but may work locally (on MacOS for example). In CI it fails with: `self-signed certificate` It's because of different behavior in `rust-native-tls` depending on the platform. This PR eliminates the issue via explicit usage of rustls. Alternative would be to disable cert verification, but it means test would be useless. Closes #273
1 parent 455fd79 commit 1611c67

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/gitea/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,7 @@ mod tests {
754754
let ca = gitea.image().tls_ca().unwrap();
755755
let ca = Certificate::from_pem(ca.as_bytes()).unwrap();
756756
let client = reqwest::ClientBuilder::new()
757+
.use_rustls_tls()
757758
.add_root_certificate(ca)
758759
.build()
759760
.unwrap();

0 commit comments

Comments
 (0)