File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed
sdk/identity/azure-identity/src/test/java/com/azure/identity Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -174,19 +174,16 @@ public void testFileReadingError(@TempDir Path tempDir) {
174
174
175
175
String nonExistentFile = tempDir .resolve ("non-existent-file.txt" ).toString ();
176
176
177
- WorkloadIdentityCredential credential = new WorkloadIdentityCredentialBuilder ()
178
- .tenantId ("dummy-tenantid" )
177
+ WorkloadIdentityCredential credential = new WorkloadIdentityCredentialBuilder ().tenantId ("dummy-tenantid" )
179
178
.clientId (CLIENT_ID )
180
179
.tokenFilePath (nonExistentFile )
181
180
.configuration (configuration )
182
181
.build ();
183
182
184
- StepVerifier .create (credential .getToken (request ))
185
- .expectErrorSatisfies (error -> {
186
- assertTrue (error instanceof RuntimeException );
187
- assertTrue (error .getMessage ().contains ("Failed to read federated token from file" ));
188
- assertTrue (error .getCause () instanceof IOException ); // Original IOException from Files.readAllBytes
189
- })
190
- .verify ();
191
- }
183
+ StepVerifier .create (credential .getToken (request )).expectErrorSatisfies (error -> {
184
+ assertTrue (error instanceof RuntimeException );
185
+ assertTrue (error .getMessage ().contains ("Failed to read federated token from file" ));
186
+ assertTrue (error .getCause () instanceof IOException ); // Original IOException from Files.readAllBytes
187
+ }).verify ();
192
188
}
189
+ }
You can’t perform that action at this time.
0 commit comments