@@ -337,21 +337,32 @@ func TestIntegrationServer_MultipleVolumes(t *testing.T) {
337337 t .Fatalf ("Servers.WaitFor returned error %s\n " , err )
338338 }
339339
340- // Ignore UUIDs in this comparison
340+ // Ignore instance-specific fields in this comparison
341341 actual := make ([]cloudscale.VolumeStub , len (server .Volumes ))
342342 copy (actual , server .Volumes )
343343 for i := range actual {
344344 actual [i ].UUID = ""
345+ actual [i ].HREF = ""
346+ actual [i ].Name = ""
345347 }
346348 expected := []cloudscale.VolumeStub {
347- {Type : "ssd" , DevicePath : "" , SizeGB : 10 , UUID : "" },
348- {Type : "ssd" , DevicePath : "" , SizeGB : 3 , UUID : "" },
349- {Type : "bulk" , DevicePath : "" , SizeGB : 100 , UUID : "" },
349+ {Type : "ssd" , SizeGB : 10 },
350+ {Type : "ssd" , SizeGB : 3 },
351+ {Type : "bulk" , SizeGB : 100 },
350352 }
351353 if ! reflect .DeepEqual (actual , expected ) {
352354 t .Errorf ("Volumes response\n got=%#v\n want=%#v" , actual , expected )
353355 }
354356
357+ for _ , volume := range server .Volumes {
358+ if volume .HREF == "" {
359+ t .Errorf ("Expected volume HREF to be non-empty for UUID %s" , volume .UUID )
360+ }
361+ if volume .Name == "" {
362+ t .Errorf ("Expected volume Name to be non-empty for UUID %s" , volume .UUID )
363+ }
364+ }
365+
355366 // delete all volume, except the root volume
356367 for _ , volume := range server .Volumes [1 :] {
357368 volumeUUID := volume .UUID
0 commit comments