52
52
import org .junit .jupiter .api .extension .RegisterExtension ;
53
53
import org .junit .jupiter .params .ParameterizedTest ;
54
54
import org .junit .jupiter .params .provider .Arguments ;
55
- import org .junit .jupiter .params .provider .CsvSource ;
56
55
import org .junit .jupiter .params .provider .MethodSource ;
57
56
58
57
import static org .junit .jupiter .params .provider .Arguments .arguments ;
@@ -104,7 +103,7 @@ void setup() {
104
103
105
104
namespace = "default" ;
106
105
podName = "apod" ;
107
- cmd = new String [] {"cmd1" , "cmd2 " };
106
+ cmd = new String [] {"sh" , "-c" , "echo Hello from inside the pod && ls /tmp " };
108
107
}
109
108
110
109
public static InputStream makeStream (int streamNum , byte [] data ) {
@@ -247,8 +246,9 @@ void url() throws IOException, ApiException, InterruptedException {
247
246
.withQueryParam ("stderr" , equalTo ("true" ))
248
247
.withQueryParam ("container" , equalTo ("container" ))
249
248
.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" )));
252
252
253
253
254
254
apiServer .verify (
@@ -259,8 +259,10 @@ void url() throws IOException, ApiException, InterruptedException {
259
259
.withQueryParam ("stderr" , equalTo ("false" ))
260
260
.withQueryParam ("container" , equalTo ("container" ))
261
261
.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
+
264
266
265
267
assertThat (p .exitValue ()).isEqualTo (EXPECTED_ERROR_EXIT_CODE );
266
268
verify (consumer , times (1 )).accept (any (Throwable .class ));
0 commit comments