@@ -166,6 +166,17 @@ public void parseReadWriteShared() {
166166 assertThat (bind .getPropagationMode (), is (PropagationMode .SHARED ));
167167 }
168168
169+ @ Test
170+ public void parseReadWriteRshared () {
171+ Bind bind = Bind .parse ("/host:/container:rw,rshared" );
172+ assertThat (bind .getPath (), is ("/host" ));
173+ assertThat (bind .getVolume ().getPath (), is ("/container" ));
174+ assertThat (bind .getAccessMode (), is (rw ));
175+ assertThat (bind .getSecMode (), is (SELContext .none ));
176+ assertThat (bind .getNoCopy (), nullValue ());
177+ assertThat (bind .getPropagationMode (), is (PropagationMode .RSHARED ));
178+ }
179+
169180 @ Test
170181 public void parseReadWriteSlave () {
171182 Bind bind = Bind .parse ("/host:/container:rw,slave" );
@@ -177,6 +188,17 @@ public void parseReadWriteSlave() {
177188 assertThat (bind .getPropagationMode (), is (PropagationMode .SLAVE ));
178189 }
179190
191+ @ Test
192+ public void parseReadWriteRslave () {
193+ Bind bind = Bind .parse ("/host:/container:rw,rslave" );
194+ assertThat (bind .getPath (), is ("/host" ));
195+ assertThat (bind .getVolume ().getPath (), is ("/container" ));
196+ assertThat (bind .getAccessMode (), is (rw ));
197+ assertThat (bind .getSecMode (), is (SELContext .none ));
198+ assertThat (bind .getNoCopy (), nullValue ());
199+ assertThat (bind .getPropagationMode (), is (PropagationMode .RSLAVE ));
200+ }
201+
180202 @ Test
181203 public void parseReadWritePrivate () {
182204 Bind bind = Bind .parse ("/host:/container:rw,private" );
@@ -188,6 +210,17 @@ public void parseReadWritePrivate() {
188210 assertThat (bind .getPropagationMode (), is (PropagationMode .PRIVATE ));
189211 }
190212
213+ @ Test
214+ public void parseReadWriteRprivate () {
215+ Bind bind = Bind .parse ("/host:/container:rw,rprivate" );
216+ assertThat (bind .getPath (), is ("/host" ));
217+ assertThat (bind .getVolume ().getPath (), is ("/container" ));
218+ assertThat (bind .getAccessMode (), is (rw ));
219+ assertThat (bind .getSecMode (), is (SELContext .none ));
220+ assertThat (bind .getNoCopy (), nullValue ());
221+ assertThat (bind .getPropagationMode (), is (PropagationMode .RPRIVATE ));
222+ }
223+
191224 @ Test
192225 public void parseReadOnly () {
193226 Bind bind = Bind .parse ("/host:/container:ro" );
@@ -284,16 +317,31 @@ public void toStringReadWriteShared() {
284317 assertThat (Bind .parse ("/host:/container:rw,shared" ).toString (), is ("/host:/container:rw,shared" ));
285318 }
286319
320+ @ Test
321+ public void toStringReadWriteRshared () {
322+ assertThat (Bind .parse ("/host:/container:rw,rshared" ).toString (), is ("/host:/container:rw,rshared" ));
323+ }
324+
287325 @ Test
288326 public void toStringReadWriteSlave () {
289327 assertThat (Bind .parse ("/host:/container:rw,slave" ).toString (), is ("/host:/container:rw,slave" ));
290328 }
291329
330+ @ Test
331+ public void toStringReadWriteRslave () {
332+ assertThat (Bind .parse ("/host:/container:rw,rslave" ).toString (), is ("/host:/container:rw,rslave" ));
333+ }
334+
292335 @ Test
293336 public void toStringReadWritePrivate () {
294337 assertThat (Bind .parse ("/host:/container:rw,private" ).toString (), is ("/host:/container:rw,private" ));
295338 }
296339
340+ @ Test
341+ public void toStringReadWriteRprivate () {
342+ assertThat (Bind .parse ("/host:/container:rw,rprivate" ).toString (), is ("/host:/container:rw,rprivate" ));
343+ }
344+
297345 @ Test
298346 public void toStringDefaultAccessMode () {
299347 assertThat (Bind .parse ("/host:/container" ).toString (), is ("/host:/container:rw" ));
0 commit comments