File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/test/java/com/github/dockerjava/netty/exec Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -109,16 +109,16 @@ public void execStartAttachStdin() throws Exception {
109109
110110 dockerClient .startContainerCmd (container .getId ()).exec ();
111111
112- InputStream stdin = new ByteArrayInputStream ("echo STDIN\n " .getBytes ());
112+ InputStream stdin = new ByteArrayInputStream ("STDIN\n " .getBytes ("UTF-8" ));
113113
114114 ByteArrayOutputStream stdout = new ByteArrayOutputStream ();
115115
116116 ExecCreateCmdResponse execCreateCmdResponse = dockerClient .execCreateCmd (container .getId ())
117- .withAttachStdout (true ).withAttachStdin (true ).withCmd ("/bin/sh " ).exec ();
117+ .withAttachStdout (true ).withAttachStdin (true ).withCmd ("cat " ).exec ();
118118 dockerClient .execStartCmd (execCreateCmdResponse .getId ()).withDetach (false ).withTty (true ).withStdIn (stdin )
119119 .exec (new ExecStartResultCallback (stdout , System .err )).awaitCompletion (5 , TimeUnit .SECONDS );
120120
121- assertEquals (stdout .toString (), "STDIN\n " );
121+ assertEquals (stdout .toString ("UTF-8" ), "STDIN\n " );
122122 }
123123
124124 @ Test (groups = "ignoreInCircleCi" )
You can’t perform that action at this time.
0 commit comments