()
| 9134 | |
| 9135 | #[test] |
| 9136 | fn read_gcloud_adc_missing_file_errors() { |
| 9137 | let _lock = TEST_ENV_LOCK |
| 9138 | .lock() |
| 9139 | .unwrap_or_else(std::sync::PoisonError::into_inner); |
| 9140 | let _guard = EnvVarGuard::set( |
| 9141 | "GOOGLE_APPLICATION_CREDENTIALS", |
| 9142 | "/nonexistent/path/to/adc.json", |
| 9143 | ); |
| 9144 | let err = super::read_gcloud_adc().expect_err("missing file should error"); |
| 9145 | assert!( |
| 9146 | err.to_string().contains("failed to read gcloud ADC file"), |
| 9147 | "unexpected error: {err}" |
| 9148 | ); |
| 9149 | } |
| 9150 | |
| 9151 | #[test] |
| 9152 | fn read_gcloud_adc_wrong_type_errors() { |
nothing calls this directly
no test coverage detected