File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,33 @@ func Test_convertToFlintlockAPI(t *testing.T) {
145145 g .Expect (converted .AdditionalVolumes [1 ].IsReadOnly ).To (BeTrue ())
146146 },
147147 },
148+ {
149+ name : "withAdditionalVolumes has virtiofs mount" ,
150+ input : microvm.VMSpec {
151+ AdditionalVolumes : []microvm.Volume {
152+ {
153+ ID : strVal1 ,
154+ ReadOnly : false ,
155+ VirtioFSPath : strVal2 ,
156+ },
157+ {
158+ ID : strVal3 ,
159+ Image : strVal4 ,
160+ ReadOnly : true ,
161+ },
162+ },
163+ },
164+ expected : func (g * WithT , converted * flintlocktypes.MicroVMSpec ) {
165+ g .Expect (converted .AdditionalVolumes ).To (HaveLen (2 ))
166+
167+ g .Expect (converted .AdditionalVolumes [0 ].Id ).To (Equal (strVal1 ))
168+ g .Expect (* converted .AdditionalVolumes [0 ].Source .VirtiofsSource ).To (Equal (strVal2 ))
169+ g .Expect (converted .AdditionalVolumes [0 ].IsReadOnly ).To (BeFalse ())
170+ g .Expect (converted .AdditionalVolumes [1 ].Id ).To (Equal (strVal3 ))
171+ g .Expect (* converted .AdditionalVolumes [1 ].Source .ContainerSource ).To (Equal (strVal4 ))
172+ g .Expect (converted .AdditionalVolumes [1 ].IsReadOnly ).To (BeTrue ())
173+ },
174+ },
148175 {
149176 name : "withAdditionalVolumes, has mountpoint" ,
150177 input : microvm.VMSpec {
You can’t perform that action at this time.
0 commit comments