Commit 328c2ef
committed
test(auth): verify GoogleCredentials.fromStream throws IOException on invalid JSON
Other client libraries (such as Python, Go, and Rust) strictly validate JSON syntax and reject malformed payload structures immediately. This test ensures Java maintains parity by asserting that an IOException is explicitly thrown when ADC JSON parsing fails, preventing silent fallbacks.
This fills an untested gap in the Java ADC resolution suite.1 parent 051aea7 commit 328c2ef
1 file changed
Lines changed: 13 additions & 1 deletion
File tree
- google-auth-library-java/oauth2_http/javatests/com/google/auth/oauth2
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
125 | 137 | | |
126 | 138 | | |
127 | | - | |
| 139 | + | |
128 | 140 | | |
129 | 141 | | |
130 | 142 | | |
| |||
0 commit comments