5252import org .junit .jupiter .api .extension .RegisterExtension ;
5353import org .junit .jupiter .params .ParameterizedTest ;
5454import org .junit .jupiter .params .provider .Arguments ;
55- import org .junit .jupiter .params .provider .CsvSource ;
5655import org .junit .jupiter .params .provider .MethodSource ;
5756
5857import static org .junit .jupiter .params .provider .Arguments .arguments ;
@@ -104,7 +103,7 @@ void setup() {
104103
105104 namespace = "default" ;
106105 podName = "apod" ;
107- cmd = new String [] {"cmd1" , "cmd2 " };
106+ cmd = new String [] {"sh" , "-c" , "echo Hello from inside the pod && ls /tmp " };
108107 }
109108
110109 public static InputStream makeStream (int streamNum , byte [] data ) {
@@ -247,8 +246,9 @@ void url() throws IOException, ApiException, InterruptedException {
247246 .withQueryParam ("stderr" , equalTo ("true" ))
248247 .withQueryParam ("container" , equalTo ("container" ))
249248 .withQueryParam ("tty" , equalTo ("false" ))
250- .withQueryParam ("command" , equalTo ("cmd1" ))
251- .withQueryParam ("command" , equalTo ("cmd2" )));
249+ .withQueryParam ("command" , equalTo ("sh" ))
250+ .withQueryParam ("command" , equalTo ("-c" ))
251+ .withQueryParam ("command" , equalTo ("echo Hello from inside the pod && ls /tmp" )));
252252
253253
254254 apiServer .verify (
@@ -259,8 +259,10 @@ void url() throws IOException, ApiException, InterruptedException {
259259 .withQueryParam ("stderr" , equalTo ("false" ))
260260 .withQueryParam ("container" , equalTo ("container" ))
261261 .withQueryParam ("tty" , equalTo ("false" ))
262- .withQueryParam ("command" , equalTo ("cmd1" ))
263- .withQueryParam ("command" , equalTo ("cmd2" )));
262+ .withQueryParam ("command" , equalTo ("sh" ))
263+ .withQueryParam ("command" , equalTo ("-c" ))
264+ .withQueryParam ("command" , equalTo ("echo Hello from inside the pod && ls /tmp" )));
265+
264266
265267 assertThat (p .exitValue ()).isEqualTo (EXPECTED_ERROR_EXIT_CODE );
266268 verify (consumer , times (1 )).accept (any (Throwable .class ));
0 commit comments