()
| 42 | |
| 43 | #[test] |
| 44 | fn credentials_leave_urls() { |
| 45 | assert_eq!( |
| 46 | urls("Authentication failed for https://alice:s3cret@example.com/org/repo: 401"), |
| 47 | "Authentication failed for https://***@example.com/org/repo: 401" |
| 48 | ); |
| 49 | assert_eq!( |
| 50 | urls("Failed to connect to remote: https://example.com/api?token=abc&x=1"), |
| 51 | "Failed to connect to remote: https://example.com/api" |
| 52 | ); |
| 53 | assert_eq!( |
| 54 | urls("fetch https://tok@example.com#frag and ssh://git@host/x.git\nthen"), |
| 55 | "fetch https://***@example.com and ssh://***@host/x.git\nthen" |
| 56 | ); |
| 57 | } |
| 58 | |
| 59 | #[test] |
| 60 | fn malformed_urls_still_lose_their_credentials() { |
nothing calls this directly
no outgoing calls
no test coverage detected