File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
src/test/java/com/github/dockerjava Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -613,4 +613,18 @@ public void onNext(Frame item) {
613613 super .onNext (item );
614614 }
615615 }
616+
617+ @ Test (groups = "ignoreInCircleCi" )
618+ public void createContainerWithCgroupParent () throws DockerException {
619+ CreateContainerResponse container = dockerClient .createContainerCmd ("busybox" )
620+ .withCgroupParent ("/parent" ).exec ();
621+
622+ LOG .info ("Created container {}" , container .toString ());
623+
624+ assertThat (container .getId (), not (isEmptyString ()));
625+
626+ InspectContainerResponse inspectContainer = dockerClient .inspectContainerCmd (container .getId ()).exec ();
627+
628+ assertThat (inspectContainer .getHostConfig ().getCgroupParent (), is ("/parent" ));
629+ }
616630}
Original file line number Diff line number Diff line change @@ -550,4 +550,18 @@ public void createContainerWithLogConfig() throws DockerException {
550550 // null becomes empty string
551551 assertEquals (inspectContainerResponse .getHostConfig ().getLogConfig ().type , logConfig .type );
552552 }
553+
554+ @ Test (groups = "ignoreInCircleCi" )
555+ public void createContainerWithCgroupParent () throws DockerException {
556+ CreateContainerResponse container = dockerClient .createContainerCmd ("busybox" )
557+ .withCgroupParent ("/parent" ).exec ();
558+
559+ LOG .info ("Created container {}" , container .toString ());
560+
561+ assertThat (container .getId (), not (isEmptyString ()));
562+
563+ InspectContainerResponse inspectContainer = dockerClient .inspectContainerCmd (container .getId ()).exec ();
564+
565+ assertThat (inspectContainer .getHostConfig ().getCgroupParent (), is ("/parent" ));
566+ }
553567}
You can’t perform that action at this time.
0 commit comments