We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3a33182 commit 4280ee7Copy full SHA for 4280ee7
src/test/java/com/github/dockerjava/netty/exec/AuthCmdExecTest.java
@@ -44,14 +44,8 @@ public void testAuth() throws Exception {
44
assertEquals(response.getStatus(), "Login Succeeded");
45
}
46
47
- @Test()
+ @Test(expectedExceptions = UnauthorizedException.class)
48
public void testAuthInvalid() throws Exception {
49
-
50
- try {
51
- DockerClientBuilder.getInstance(config("garbage")).build().authCmd().exec();
52
- fail("Expected a UnauthorizedException caused by a bad password.");
53
- } catch (UnauthorizedException e) {
54
- assertEquals(e.getMessage(), "Wrong login/password, please try again\n");
55
- }
+ DockerClientBuilder.getInstance(config("garbage")).build().authCmd().exec();
56
57
0 commit comments