@@ -211,6 +211,25 @@ var _ = utils.SIGDescribe("PersistentVolumes", func() {
211
211
completeTest (ctx , f , c , ns , pv , pvc )
212
212
})
213
213
214
+ // The same as above, but with multiple volumes reference the same PVC in the pod.
215
+ ginkgo .It ("create a PVC and use it multiple times in a single pod" , func (ctx context.Context ) {
216
+ pv , pvc , err = e2epv .CreatePVPVC (ctx , c , f .Timeouts , pvConfig , pvcConfig , ns , true )
217
+ framework .ExpectNoError (err )
218
+
219
+ framework .Logf ("Creating nfs test pod" )
220
+ pod := e2epod .MakePod (ns , nil , []* v1.PersistentVolumeClaim {pvc , pvc }, admissionapi .LevelPrivileged ,
221
+ "touch /mnt/volume1/SUCCESS && cat /mnt/volume2/SUCCESS" )
222
+ runPod , err := c .CoreV1 ().Pods (ns ).Create (ctx , pod , metav1.CreateOptions {})
223
+ framework .ExpectNoError (err )
224
+ defer func () {
225
+ err := e2epod .DeletePodWithWait (ctx , c , runPod )
226
+ framework .ExpectNoError (err )
227
+ }()
228
+
229
+ err = testPodSuccessOrFail (ctx , c , f .Timeouts , ns , runPod )
230
+ framework .ExpectNoError (err )
231
+ })
232
+
214
233
// Create new PV without claim, verify it's in Available state and LastPhaseTransitionTime is set.
215
234
f .It ("create a PV: test phase transition timestamp is set and phase is Available" , func (ctx context.Context ) {
216
235
pvObj := e2epv .MakePersistentVolume (pvConfig )
0 commit comments